G
Guest
Hi,
I can't find any information on how to use automation to save a file in
MFC. I have the file name I need to save to. I have automation working and
have my workbook created. Now all I need is the correct way to call the
Workbook::SaveAs method.
This is what I'm trying right now:
book.SaveAs(COleVariant(outputFilename), COleVariant((long)
xlWorkbookNormal), covOptional,
covOptional, covFalse, covFalse, *value for write*???, covOptional,
covOptional, covOptional,
covOptional, covOptional); // I have tried a few values for the write
value.
I keep getting an Error Message Box saying: "The file could not be
accessed" and a bunch of incorrect suggestions as to the cause of the problem.
Please help if you can!
Thanks in advance!
Aruk
I can't find any information on how to use automation to save a file in
MFC. I have the file name I need to save to. I have automation working and
have my workbook created. Now all I need is the correct way to call the
Workbook::SaveAs method.
This is what I'm trying right now:
book.SaveAs(COleVariant(outputFilename), COleVariant((long)
xlWorkbookNormal), covOptional,
covOptional, covFalse, covFalse, *value for write*???, covOptional,
covOptional, covOptional,
covOptional, covOptional); // I have tried a few values for the write
value.
I keep getting an Error Message Box saying: "The file could not be
accessed" and a bunch of incorrect suggestions as to the cause of the problem.
Please help if you can!
Thanks in advance!
Aruk