P
PO
Hi,
I want to use the Export method to send an OWC11 Spreadsheet to Excel 2003.
After the export I want to do some additional formatting (PageSetup) to the
spreadsheet in Excel. The Spreadsheet1.Export method however leaves me with
no reference to the created Excel spreadsheet.
Basically what I want to do is (the code doesn't work, it's just what I want
to accomplish)
Sub ExportToExcel()
Set xlApp = CreateObject("Excel.Application")
Set xlWB = xlapp.Workbooks.add
Set xlSheet = xlwb.Sheets.add
xlSheet = Spreadsheet1.Export
xlSheet.PageSetup
'Some additional setup
End Sub
I've tried
Spreadsheet1.UsedRange.Copy
xlSheet.Paste
xlSheet.PageSetup
Which works but with some major drawbacks:
1. No column/row formatting is retained
2. Autofilter isn't retained
3. Sometimes formulas are pasted as values
4. If Spreadsheet1 contains large amounts of data the export takes a long
time
Is it possible to use the export method to accomplish this or is there some
better way?
Regards
Pete
I want to use the Export method to send an OWC11 Spreadsheet to Excel 2003.
After the export I want to do some additional formatting (PageSetup) to the
spreadsheet in Excel. The Spreadsheet1.Export method however leaves me with
no reference to the created Excel spreadsheet.
Basically what I want to do is (the code doesn't work, it's just what I want
to accomplish)
Sub ExportToExcel()
Set xlApp = CreateObject("Excel.Application")
Set xlWB = xlapp.Workbooks.add
Set xlSheet = xlwb.Sheets.add
xlSheet = Spreadsheet1.Export
xlSheet.PageSetup
'Some additional setup
End Sub
I've tried
Spreadsheet1.UsedRange.Copy
xlSheet.Paste
xlSheet.PageSetup
Which works but with some major drawbacks:
1. No column/row formatting is retained
2. Autofilter isn't retained
3. Sometimes formulas are pasted as values
4. If Spreadsheet1 contains large amounts of data the export takes a long
time
Is it possible to use the export method to accomplish this or is there some
better way?
Regards
Pete