Choose Language Hide Translation Bar
Highlighted
uday_guntupalli
Community Trekker

Create Excel Workbook - help

All, 

    I am doing the following: 

 

If(OutputFlag & DirectoryExists(OutputFolderName),
	WorkBookName = OutputFolderName || "\" || "ComparisionResults.xlsx" ;
	Create Excel Workbook(WorkBookName,TablesList);
  ); 

   From checking in the log, and the background, I know the JMP data tables are open and TablesList is a list with table names. Output Flag is set to 1 . 

   Every time I call on Create Excel Workbook function - it returns an "Unknown" error .Any guidance on how to fix this ? 

 

 

Best
Uday
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
cwillden
Super User

Re: Create Excel Workbook - help

Got your pm.  I can't seen anything wrong with what you have. The 2-table example I ran shows there's nothing explicitly wrong with the code you shared.  I wonder if the issue might have anything to do with the number of tables you are putting into the workbook.  See if you can get it to work with a small subset of the tables list.  If it works, try to isolate the issue by playing with the tablelist until it you can find the trigger for the error.

-- Cameron Willden

View solution in original post

0 Kudos
2 REPLIES 2
cwillden
Super User

Re: Create Excel Workbook - help

Can you show the values of WorkBookName and TableList?

I ran the following and it worked as expected:

big class = open("$Sample_Data/Big Class.jmp");
abrasion = open("$Sample_Data/Abrasion.jmp");

OutputFolderName = "$DOCUMENTS";
OutputFlag = 1;
DirectoryExists(OutputFolderName)

TablesList = {"Big Class", "Abrasion"};

If(OutputFlag & DirectoryExists(OutputFolderName),
	WorkBookName = OutputFolderName || "\" || "ComparisonResults.xlsx" ;
	Create Excel Workbook(WorkBookName,TablesList);
); 
-- Cameron Willden
0 Kudos
cwillden
Super User

Re: Create Excel Workbook - help

Got your pm.  I can't seen anything wrong with what you have. The 2-table example I ran shows there's nothing explicitly wrong with the code you shared.  I wonder if the issue might have anything to do with the number of tables you are putting into the workbook.  See if you can get it to work with a small subset of the tables list.  If it works, try to isolate the issue by playing with the tablelist until it you can find the trigger for the error.

-- Cameron Willden

View solution in original post

0 Kudos