Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Creating Worksheet using Server Object
I am using the CreateObject("Excel.Application") to create a workbook from
three separate tables in a sql db. This works great and compiles three separate sheets to one workbook. My issue is that I need the cell formatting to be text for all entries. However the Excel spreadsheet will take my data - 05/05 and translate to 05-May OR my data 0140 and translate to 140. How can I write the vbscript to format all cells to text? -- Olivia Towery |
#2
|
|||
|
|||
"Olivia Towery" wrote in message
I am using the CreateObject("Excel.Application") to create a workbook from three separate tables in a sql db. This works great and compiles three separate sheets to one workbook. My issue is that I need the cell formatting to be text for all entries. However the Excel spreadsheet will take my data - 05/05 and translate to 05-May OR my data 0140 and translate to 140. How can I write the vbscript to format all cells to text? Like this. With CreateObject("Excel.Application") .Visible = True With .Workbooks.Add(1).Sheets(1) .Cells.NumberFormat = "@" .Cells(1, 1).Formula ="05/05" End With End With -- Miyahn (Masataka Miya****a) JPN Microsoft MVP for Microsoft Office - Excel(Jan 2005 - Dec 2005) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating links to a worksheet on a network. | Excel Worksheet Functions | |||
Creating links to a worksheet on a network. | Excel Worksheet Functions | |||
Creating a worksheet in Spanish | Excel Discussion (Misc queries) | |||
Creating new worksheet from existing | Excel Discussion (Misc queries) | |||
Using Indirect & Creating a worksheet Macro | Excel Worksheet Functions |