Opened 14 years ago
Closed 14 years ago
#1215 closed defect (fixed)
TolExcel Sheet selection functions behave imporperly
Reported by: | jmdedios | Owned by: | Jorge |
---|---|---|---|
Priority: | normal | Milestone: | TOL Packages |
Component: | Excel API | Version: | head |
Severity: | critical | Keywords: | Excel, worksheet |
Cc: |
Description
ActivateWS and ActivateNamedWS functions allways return 'True' value, even when the number or name of worksheet doesn't exist. If the worksheet doesn't exist, they print an error message like: 'ActivateNamedWS: no se ha posido establecer la hoja activa Alto Valor', but return 'True' instead of 'False'.
Attachments (1)
Change History (4)
Changed 14 years ago by
Attachment: | Capacidades_20100601.xls added |
---|
comment:1 Changed 14 years ago by
Severity: | normal → critical |
---|
comment:2 Changed 14 years ago by
Status: | new → accepted |
---|
The second part of this ticket has being move to #1216
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note: See
TracTickets for help on using
tickets.
In addition to the previous comment, there are excel documents that cannot be read with these functions. The excel attached is impossible to be read because the functions ActivateWS and ActivateNamedWS can only activate the first sheet. The following code opens the excel attached an activates the first sheet ("Resumen Tráfico") but it returns an error when trying to activate another one.
However, the code using the old version of the functions, activates all the sheets of the excel book.
#Require TolExcel;
TolExcel::@WorkBook wb = TolExcel::@WorkBook::Open( "c:/Temp/Capacidades_20100701.xls" );
Real resSelHoj = wb::ActivateNamedWS("Resumen Tráfico");
wb::ActivateNamedWS("Desarrollo");
Real resSelHoj = wb::ActivateWS(1);
wb::ActivateWS(2);
Real wb::Close(?);
Text XLSOpenExcel("c:/Temp/Capacidades_20100701.xls", 0);
Text XLSSelectWorksheetIndex(3);
Text XLSSelectWorksheetByName("Desarrollo");
Text XLSQuit(?);