Could someone please point me in the right direction please? I can access and manipulate a file that already exists, but what about creating a new one?
Set varXLFile = CreateObject(“Excel.Application”)
varXLFile.Visible = False
Set varXLWorkbook = Nothing
then???
Any help would be appreciated. Thanks.
Subject: Creating a NEW excel file using LotusScript
This link was of great use to me the first time I had to create an excel file from LS
http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256E3200749907
Hope it’s equally as useful for you!
Subject: RE: Creating a NEW excel file using LotusScript
Super! Thanks. Unfortunately there’s nothing there about the SaveAs function… Is it a simple matter of workbook.saveas(path$)?
Subject: RE: Creating a NEW excel file using LotusScript
Try something like this:
Call varXLFile.ActiveWorkbook.SaveAs(“YOUR FILE PATH HERE”)
Subject: Creating a NEW excel file using LotusScript
You’re going to want to call a SaveAs on your workbook before you get rid of it. You’ve called your app variable “varXLFile”, but the file is the workbook, not the application instance.