 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Mon Apr 02, 2007 9:06 pm Post subject: TExcel Application: Excel XP -> Excel 2007 |
|
|
Hi
I´m using TExcelApplication to generate a differents .xls from a
template. I have migrate to Excel 2007. I have updated the templates
from.xls to .xlsm. I generate differents files with new data.
ExcelApplPool->Connect();
// Open template
wb=ExcelAppl->Workbooks->Open(wfPath.c_bstr());
// Get specific sheet
ws=wb->get_Sheets()->get_Item(numSheet);
ws->Unproctect(&TVariant(WideString(TKM_PASSWORD)));
// Rename
ws->setName(WideString(listCategoryName);
// Write data
(ws->get_Range("N4"))->set_Value(WideString(listCategoryName));
...............................
ws->Protect(&TVariant(WideString(TKM_PASSWORD)));
ws->SaveAs(xlsPath.c_bstr());
wb->Close();
ExcelApplPool->Quit();
ExcelApplPool->Disconnect();
With Excel XP is working correctly but with Excel 2007 doesn´t work. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|