Autofit columns and XML/HTML

For our web based apps, we are starting to use Excel for all
reportings.  Using XML, I'm able to define what rows to repeat on each
page, define page width, headers, footers, etc..  Works great for a
cost efficient web reporting.

The only issue I've come across is that I'd like to autofit the column
width when the file is opened.  Is there any way to issue a command to
Excel within XML?  TIA.

0
1/14/2005 1:26:06 PM
excel 39879 articles. 2 followers. Follow

1 Replies
509 Views

Similar Articles

[PageSpeed] 27

Larry

Not within the XML.  The only way this could be done would be to establish a 
workbook_open event in the workbook, but that would present a macro warning 
dialog that would need to be clicked by the user. (If their security 
settings were not set to high)

-- 
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS


"Larry Bud" <larrybud2002@yahoo.com> wrote in message 
news:1105709166.781864.75760@c13g2000cwb.googlegroups.com...
> For our web based apps, we are starting to use Excel for all
> reportings.  Using XML, I'm able to define what rows to repeat on each
> page, define page width, headers, footers, etc..  Works great for a
> cost efficient web reporting.
>
> The only issue I've come across is that I'd like to autofit the column
> width when the file is opened.  Is there any way to issue a command to
> Excel within XML?  TIA.
> 


0
1/15/2005 8:40:54 AM
Reply:

Similar Artilces:

Find and Replace within an XML file
I was wondering if there is a simple method of replacing characters within the xml document. I'm looking at writing a Biztalk Pipeline that escapes illegal characters before they are processed by a HL7 assembler. I.E. replace all instances of &amp; or & with \T\ . I thought about converting to a string and using the replace function, but that would mean knownig all the HTML codes for characters (as the escape characters are to be dynamically chosen by the user). Where as I could via xpath ??? replace all instances of the original character such as &. Hope it makes sen...

only the first 5 columns of a 10 column excel spreadsheet sort
How do I get the whole spread sheet to sort? There is a blue lox for the first 5 columns that limits the range of the sort. How do I remove it? Using Office 2003. Maybe if you remove the Data|list Select a cell in that blue box. Data|list|convert to range jrw562 wrote: > > How do I get the whole spread sheet to sort? There is a blue lox for the > first 5 columns that limits the range of the sort. How do I remove it? > Using Office 2003. -- Dave Peterson ...

Hide columns according to background fill color
I am having trouble understanding how Excel handles colors. I have a public sub that sets a public variable, "TermColor" using the RGB function. TermColor is of type MsoRGBType. In another module, I use the TermColor variable as follows: Sub WeedColsByColor(ByRef Clr, ByRef WS) Dim LastCol, i As Long With Worksheets(WS) LastCol = ActiveSheet.UsedRange.Row - 1 + ActiveSheet.UsedRange.Rows.Count 'hide columns if they have one of the forbidden colors Debug.Print (CBool(.Cells(2, i).Interior.Color = Clr)) ...

How to Read/Write ADO.NET DataSet XML file without .Net runtime in VC6/VB6?
The ADO.NET DataSet XML file is used in our system, But I want use VC6/VB6 to Read and Write the XML data file, Where can find the C++/MFC/ActiveX tools for VC6/VB6? thanks! http://gnonug.xocomp.net/Support/FAQ/551.aspx Transform ADO.NET DataSet to ADO Recordset Best Regards Onega www.fruitfruit.com "jiatiejun" <jiatiejun@126.com> wrote in message news:#m8vcOa2DHA.3436@tk2msftngp13.phx.gbl... > The ADO.NET DataSet XML file is used in our system, > > But I want use VC6/VB6 to Read and Write the XML data file, > > Where can find the C++/MFC/ActiveX tools f...

Can there be variable size columns in one report?
I want to create a report that has 3 sub-reports of different column widths. Is this possible? -The 1st sub-report has 1 column that occupies the entire width of the page -The 2nd sub-report can fit 2 columns in the page width -The 3rd sub-report can fit 3 columns in the page width Subreports can have any number of columns that don't have to be the same from one to another. Typically your columns should display across then down in order to render properly as a subreport. -- Duane Hookom Microsoft Access MVP "SheldonHinds" wrote: > I want to create a r...

Xml into Dataset #2
Hi All; I'm reading the following xml file into a Dataset but there are only 4 datatables in my dataset (which should be 5) Is that because I have two nodes with the same name (detail) in my xml file? how can I fix this? Thanks for your time. <?xml version="1.0" ?> - <report> - <subreport> - <header> <sales_order>S218575</sales_order> </header> - <detail> <sod_part>776545995278</sod_part> <batch_code /> <input_qty /> &...

Viewing xml created in .Net in a ASP form VB6
I have been trying to create an xml document in VB.Net for displaying on an existing page written in ASP. im having a type mismatch error in my code. When i view my XML i have the following included in the <binary> node. <Binary xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">DATA HERE </Binary My issue is how do i set the datatype of the the node using dotnet so that i can replicate the same node structure and use my existing ASP page. thanks in advance Colin Graham ...

Trouble Reading XML string
I have a method that generates an string in XML format and passes it to be processed. The string is in the following format: <grandparent> <parent> <child1>text</child1> <child2>text again</child2> </parent> <aunt> <cousin1>text</cousin1> <cousin2>text2</cousin2> <cousin3>text4</cousin3> </aunt> </grandparent> string xmlInput = <values above> XPathDocument xpDoc = new XPathDocument(new StringReader(xmlInput)); XPathNavigator xpNav = xpD...

cant open html file in outlook 2007
hi, i am having trouble opening attached html file . error is " cant create html file .press Right click on the mouse and check permission on the file" can any body help :( -- בכבוד רב, מישל ויאנקור Have you tried clearing Microsoft Outlook's secure temp folder? "michel" <vaillancourt.michel@gmail.com> wrote in message news:AF480A87-907E-464C-A8A1-6C208A477950@microsoft.com... > hi, > > i am having trouble opening attached html file . error is " cant create > html > file .press Right click on the mouse and check...

Excel 2003: How to make transparent columns in Excel chart?
If you create a bar plot froma given dataset you can format the columns by right clicking and choosing the desired options. In the tab that opens there is a slider which is supposed tho set the level of transparency of the column (selceted area). But so far i couldn't find a way how to use this slider. I know that there is an alternative way to get transparent bars by creating a rectangular object formating it and the use copy -> paste. But i wonder what is the slider for if you can't use it? Does anybody know have an idea? Cheers, Thomas ...

MSPersisted XML ...
I have an ADO Persisted XML file. I have a couple of XML files, 1) containes single Schemas in it and I can load this perfectly using MSPersist 2) Containes multiple Schemas and when I try to load this, ADO only sees the first schema. How do I handle an XML file with multiple schemas ? What is the best way to read this in VB.NET or C# ? Are there any examples please ? Thanks, Michael ...

Column width
In Sheet 1 I have a certain amount of data, I want to select some cells and copy them to Sheet 2 keeping the same format. When I do this, the fonts and the colours remain unchanged, but the column width don't. I have tried paste special, but couldn't figure it out. Is this possible? Thanks in advance Regards, Emece.- --Copy range --Select the target cell and right click >PasteSpecial>All>OK --Keeping the target selection right click>PasteSpecial>select ColumnWidth>OK If this post helps click Yes --------------- Jacob Skaria "Emece"...

Q: How to paste HTML source directly into HTML message?
I'm in a situation where I want to take HTML source from a web page and send it to someone so that the email looks like the web page. I can't figure out any way to get the source into an HTML as *source* and not text. For example I want to copy & paste this: <strong>Hi there!</strong> And have it show up like this (in bold, of course): Hi there! Any thoughts? Thanks in advance! ...

Add values in a column according to value in another column
How can I add the values in a column according to values in another column? If there is any value in a row in column B, I want to include the value of the corresponding row in column A. I'm flexible as to whether this is ANY value (i.e. not empty) or greater than zero. Hi Paul Maybe something like this =IF(B1="","",IF(B1>0,B1+A1)) Regards Cimjet "Paul Kaye" <paulmjkaye@gmail.com> wrote in message news:05befaf3-9ba8-48c8-aebb-654f0269d1dc@34g2000hsf.googlegroups.com... > How can I add the values in a column according to values in another > colu...

xml serialization over a NetworkStream
I'm trying to set up something to stream objects serialized into xml from one end of a tcp connection to the other. To that end, I've gotten a connection working without too much fuss. However, when I serialize an object into a NetworkStream on one end and then try to deserialize it on the other, nothing happens. The sender acts as though the serialization went off without a hitch, but the receiver never gets it. After some research, I've found that closing the stream will cause the receiving end to get and deserialize the object properly. But that CAN'T be the best...

How do I make a column be my default column in Access
I need to make my desricption field my default field. How do I do that? Right not it defaults to my items field. me.controlname.setfocus or in macro GoToControl "controlname" Bonnie http://www.dataplus-svc.com michelle wrote: >I need to make my desricption field my default field. How do I do that? Right >not it defaults to my items field. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access/200912/1 Or, if you don't want to use events, simply set your tab order from the form design view. -- Frank H R...

Copying non-adjacent columns to adjacent rows
Hi all, I consider myself fluent in Excel, but I've developed a situation that has stumped me. Any help would be much appreciated. I might be able to solve this issue if somebody could show me how to add a number to a column. For example, if I want Excel to pull data from Column D, how can I get Excel to realize that column D is really the same thing as Column A + 3? I know you can use the column() command to get the numerical value for a column, but is there a way to have it do that in reverse, such that you could tell it the column number is 4 and it would know that you are referring...

Autofit rows
I am having an issue with autofitting rows in a spreadsheet of imported text in Excel 2003. There are no merged cells in the document, and none of the cells go over the 1024 character limit. When I select all rows and attempt to autofit the rows to the contents of the cells, some of the rows resize properly, and some leave one or several lines of white space below the bottom of the text in the longest cell. I can resize them manually, but this is data that is imported daily and runs to several thousand rows. If I widen the column where I am having the problem, once it reaches a certain ...

counting dates <= 7 days ago based on criteria in a diff column
I have a spreadsheet that holds all tasks for a project. Column D holds a catagory and column Q holds the date closed. I need a formula (on a separate sheet) that counts all tasks of a specific category that were closed in the past 7 days. I already have a formula that calculates all tasks that were closed in the past 7 days, just need to add the additional criterion of the category. Hi, Try this =sumproduct((sheet1!D2:D30=A2)*((today()-sheet1!Q2:Q30)=7)) A2 on sheet2 has the specific category for which you want to count the closed tasks -- Regards, Ashish Mathur...

How do I clear a column of data without clearing the formulas?
I want to zero out a column of data, but not the subtotal formulas. How can I do that easily without going to every cell? Hi Select your column then choose edit / goto / special - constants - ok this will just select the non-formula cells then press the delete key cheers JulieD "EllenSwarts" <EllenSwarts@discussions.microsoft.com> wrote in message news:DD518142-47BC-438D-BE23-8DF1E9F72042@microsoft.com... >I want to zero out a column of data, but not the subtotal formulas. How >can > I do that easily without going to every cell? qlso look at: http://www...

excel command that counts conditions met in 2 columns?
is there a form of countif that increments only if conditions are met in two (or more) columns? e.g., countif(colA = 1 and colB = 2) Hi You need SUMPRODUCT. Have a look here for some guidance and post back if you need some more help. http://www.contextures.com/xlFunctions01.html#SumProduct Hope this helps. Andy. "brendalw" <brendalw@discussions.microsoft.com> wrote in message news:F21CD5F8-8679-4A8E-90FC-AA35657C19DC@microsoft.com... > is there a form of countif that increments only if conditions are met in > two > (or more) columns? e.g., countif(colA = 1 a...

Reply/forward in HTML #2
Using Office 2003 is there a way to automatically forward or reply in HTML? I have an autosignature with links to our company website, etc and unless it's in html it's just so much text. I know I can manually change replies/ forward to html but is there a way to set O2003 to do so automatically? Steve Ignots signots@aol.com <signots@aol.com> wrote: > Using Office 2003 is there a way to automatically forward or reply in > HTML? I have an autosignature with links to our company website, etc > and unless it's in html it's just so much text. I know I can manually ...

Need to create blank computation column
Ok, let's try again. This time I'm breaking it down to a simple problem so that I don't confuse anyone: I have 3 cells in a row. In cell x I have a variable. In cell y I have a variable. In cell z I have a formula: =x*y . Now if the user is presented with variable x and nothing for variable y, and the formula is already in place, cell z will display 0. But I want the user to be presented with a blank field instead, until such time he/she enters in a variable for cell y. Therefore, I need to know what command will tell cell z to display a figure only if the computation is ...

cursor moves too fast while shading text in columns
When I try to shade a portion of a column in excel or a word table, sometimes the cursor moves so quick to the end of the column that I can't get it to stop where I want the shading to stop. This does not happen in every table or every spreadsheet. Is there a setting somewhere that I'm overlooking?? Thanks for your help!! A better technique is to do a shift-click. Click on the first cell, then scroll down (or over), hold the shift key down, and click the last cell, all cells in between will be shaded "nanimadrina" wrote: > When I try to shade a portion of a colum...

Selecting the Active Column
Hi, I need a macro such that the macro will copy the particular column that my active cell is. Currently, I recorded a macro that looks like this: Sub Macro1() Columns("C:C").Select Selection.Copy Selection.Insert Shift:=xlToLeft End Sub 1) How can I change the above such that i'll click on a cell that I want the macro to copy the column, then run the macro. 2) Is it possible for the macro to track the last column, copy the column and insert to the left of the column? Thanks! Regards, Val You would have to use the selectionchange event with a global or ...