XLSX-Workbook-Class icon indicating copy to clipboard operation
XLSX-Workbook-Class copied to clipboard

Permissions Issue when trying to SaveWorkbookAs

Open eselje opened this issue 5 years ago • 1 comments

Not sure what's happening, but SaveWorkBookAs doesn't want to save. It returns .t. but no file appears. I'm sending it the full path name.

oXLSX = CREATEOBJECT("VFPWorkBookXSLX.VFPWorkBookXSLX")
iWorkbook = oxlsx.openxlsxworkbook(cActionPriceSheet)
IF lRename
 cActionPriceSheet = ADDBS(JUSTPATH(cActionPriceSheet))+"Action Price Sheet " +  ;
   TRANSFORM(DTOC(DATE(),1),'@R 9999-99-99')+".xlsx"
ENDIF 
iResult = oxlsx.saveworkbookas(iWorkBook,cActionPriceSheet)

eselje avatar Nov 24 '19 23:11 eselje

Have you traced in debug mode? The SaveWorkbookAs() method will always return .T.; I will make changes to return the actual value from the SaveWorkbook() method. Please add a breakpoint at the call to this method and see what the return value is. You might need to step through the SaveWorkBook() method to see where the save is not occurring. Please let me know the results.


From: Eric Selje [email protected] Sent: Sunday, November 24, 2019 6:31 PM To: ggreen86/XLSX-Workbook-Class [email protected] Cc: Subscribed [email protected] Subject: [ggreen86/XLSX-Workbook-Class] Permissions Issue when trying to SaveWorkbookAs (#30)

Not sure what's happening, but SaveWorkBookAs doesn't want to save. It returns .t. but no file appears. I'm sending it the full path name.

oXLSX = CREATEOBJECT("VFPWorkBookXSLX.VFPWorkBookXSLX") iWorkbook = oxlsx.openxlsxworkbook(cActionPriceSheet) IF lRename cActionPriceSheet = ADDBS(JUSTPATH(cActionPriceSheet))+"Action Price Sheet " + TRANSFORM(DTOC(DATE(),1),'@R 9999-99-99')+".xlsx" ENDIF iResult = oxlsx.saveworkbookas(iWorkBook,cActionPriceSheet)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/30?email_source=notifications&email_token=AGWB33IJ6YK3WA4JQDLRVTDQVMFF5A5CNFSM4JRBS3SKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H3VHREQ, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33MYKDSSIOMNQVA56OTQVMFF5ANCNFSM4JRBS3SA.

ggreen86 avatar Nov 27 '19 01:11 ggreen86