4
4usenet
Hi there,
im coding an Excel AddIn ( custom command bar + 1 button ), in
c++/atl/wtl
i need to upload active workbook as xml to the web, but i have not
touch this active wb in any way.
So first i do
CComPtr<xl::_Workbook> first;
first->SaveCopyAs(filename)
then i open it in same application. After removing a few sheets, i try
to save it
hr = wb->SaveAs(
CComVariant(filename2),
CComVariant(xl::xlXMLSpreadsheet),
vtMissing,
vtMissing,
vtMissing,
vtMissing,
xl::xlNoChange
);
this goes ok, though visual studio detects probably win32 exception:
RPC server unavailable ( or not available)
then i do wb->Close(), so the xml Workbook is closed, but the first
original should be still there, right?
sooo, everyting works nice, except when i perform that on clean
workbook, i.e i launch excel and immediately press my custom upload
button which performs the sequence above..
with blank template workbook, after closing the XML spreadsheet, the
first workbook is not there too..
everyting is done in the same thread.
im coding an Excel AddIn ( custom command bar + 1 button ), in
c++/atl/wtl
i need to upload active workbook as xml to the web, but i have not
touch this active wb in any way.
So first i do
CComPtr<xl::_Workbook> first;
first->SaveCopyAs(filename)
then i open it in same application. After removing a few sheets, i try
to save it
hr = wb->SaveAs(
CComVariant(filename2),
CComVariant(xl::xlXMLSpreadsheet),
vtMissing,
vtMissing,
vtMissing,
vtMissing,
xl::xlNoChange
);
this goes ok, though visual studio detects probably win32 exception:
RPC server unavailable ( or not available)
then i do wb->Close(), so the xml Workbook is closed, but the first
original should be still there, right?
sooo, everyting works nice, except when i perform that on clean
workbook, i.e i launch excel and immediately press my custom upload
button which performs the sequence above..
with blank template workbook, after closing the XML spreadsheet, the
first workbook is not there too..
everyting is done in the same thread.