DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Specified Worksheet Index

I am getting an error that I cannot solve or work-around. I have simplified the code to the following example:

Call PICLOAD("Report2.tdr")    
Call PICFileAppend("Report2.tdr")    
Call PICFileAppend("Report2.tdr")    
call picpdfexport("c:\sample.pdf")
call picdelete
Call PICLOAD("Report2.tdr")    
call picexport("c:\sample.wmf", "wmf")


At the PicExport call I get the following error:
"The specified worksheet index (2) is invalid"

Can you please provide a solution or work-around?

I am using Diadem 9.1 SP2.

Thanks.
0 Kudos
Message 1 of 3
(3,462 Views)
Hello Cowbreath,

Unfortunaetly you found a bug which is fixed for DIAdem 10.0. As workaround you can set two variables as follows:

Call PICLOAD("Report2.tdr")   
Call PICFileAppend("Report2.tdr")   
Call PICFileAppend("Report2.tdr")   
call picpdfexport("c:\sample.pdf")
call picdelete
Call PICLOAD("Report2.tdr")   

PrintFromPage = 1
PrintToPage = 1

call picexport("c:\sample.wmf", "wmf")

Greetings
Walter
0 Kudos
Message 2 of 3
(3,450 Views)
Thank you for the work-around.
0 Kudos
Message 3 of 3
(3,441 Views)