Hi...
I did this...n it worked...
DoCmd.OutputTo acTable, "test2", acSpreadsheetTy peExcel9, "strPath", 1
Thanks a lot for ur support
Shaq
Excel report using old version of MS excel
Collapse
X
-
'I see no reason why this shouldn't work:Originally posted by Shakss2I also tried:
DoCmd.OutputTo acTable, "test2", "MicrosoftExcel Biff8(*.xls)", "strPath", 1
But it is still using version 5
Shaq
[CODE=vb]DoCmd.OutputTo acTable, "Test2", "MicrosoftExcel Biff8(*.xls)", strPath, 1[/CODE]Leave a comment:
-
I also tried:
DoCmd.OutputTo acTable, "test2", "MicrosoftExcel Biff8(*.xls)", "strPath", 1
But it is still using version 5
ShaqLeave a comment:
-
Sorry for the previous post...
It was my mistake...
That seem to work but it is still using the old version 5.
How can i force it to use version 7 or 8...
Below is the complete code:
Dim strPath As String
' Current path
strPath = CurrentProject. Path & "\Adhoc_Report. xls"
' New workbook object
Dim sh As Workbook
DoCmd.OutputTo acTable, "test2", "MicrosoftExcel Biff5(*.xls)", "strPath", 1
' Setting obj
Set sh = CreateObject(st rPath)
sh.ActiveSheet. Cells.ColumnWid th = 23
sh.ActiveSheet. Cells.EntireRow .AutoFit
ShaqLeave a comment:
-
Hey Thanks for that reply...
But im getting the following error if I use this:
Runtime error 429
ActiveX component cant create object
But if I use the below code, it works:
DoCmd.OutputTo acOutputTable, "test2", acFormatXLS, strPath, 1
Below is the complete code:
Dim strPath As String
' Current path
strPath = CurrentProject. Path & "\Adhoc_Report. xls"
' New workbook object
Dim sh As Workbook
DoCmd.OutputTo acOutputTable, "test2", acFormatXLS, strPath, 1
' This gives the above error:
' DoCmd.OutputTo acTable, "test2", "MicrosoftExcel Biff5(*.xls)", "strPath", 1
' Setting obj
Set sh = CreateObject(st rPath)
sh.ActiveSheet. Cells.ColumnWid th = 23
sh.ActiveSheet. Cells.EntireRow .AutoFit
ShaqLeave a comment:
-
Try:Originally posted by Shakss2Hello all,
Im displaying a report in excel.
below is my code:
Dim strPath As String
' Current path
strPath = CurrentProject. Path & "\Adhoc_Report. xls"
'New workbook object
Dim sh As Workbook
DoCmd.OutputTo acOutputTable, "test2", acFormatXLS, strPath, 1
'Setting obj
Set sh = CreateObject(st rPath)
'sh.ActiveSheet .Cells.EntireCo lumn.AutoFit
sh.ActiveSheet. Cells.ColumnWid th = 23
sh.ActiveSheet. Cells.EntireRow .AutoFit
The excel workbook is a Microsoft excel 5.0/95 Workbook.
But the system has the 2003 version installed.
cuz of this old version my report has cell limit of 255 only which truncatest the data.
I strongly believe I should be able to specify the version to be used in my code.
help with the code will be grately appreciated.
Thanks
Shaq
[CODE=vb]
DoCmd.OutputTo acTable, "Test2", "MicrosoftExcel Biff5(*.xls)", strPath", 1[/CODE]Leave a comment:
-
Excel report using old version of MS excel
Hello all,
Im displaying a report in excel.
below is my code:
Dim strPath As String
' Current path
strPath = CurrentProject. Path & "\Adhoc_Report. xls"
'New workbook object
Dim sh As Workbook
DoCmd.OutputTo acOutputTable, "test2", acFormatXLS, strPath, 1
'Setting obj
Set sh = CreateObject(st rPath)
'sh.ActiveSheet .Cells.EntireCo lumn.AutoFit
sh.ActiveSheet. Cells.ColumnWid th = 23
sh.ActiveSheet. Cells.EntireRow .AutoFit
The excel workbook is a Microsoft excel 5.0/95 Workbook.
But the system has the 2003 version installed.
cuz of this old version my report has cell limit of 255 only which truncatest the data.
I strongly believe I should be able to specify the version to be used in my code.
help with the code will be grately appreciated.
Thanks
ShaqTags: None
Leave a comment: