TJ Barber

Blaze Accessing External Local Files

Discussion created by TJ Barber on Oct 5, 2011
Latest reply on Oct 6, 2011 by TJ Barber

I am testing some functionality by attempting to access an excel file on my machine, locally. I have imported the jar file which contains all the classes and methods that I would need to do so. The code compiles and is logically sound, but I get a runtime error indicating the that file I am trying to access was "unknown." I can surmise that the path to the file is wrong or that I do not have the necessary classes to handle this code.

 

Question:

1. Does Blaze share Java's file access protocols (program can only access a file within its current directory, sub directory, or special access is granted)?

 

2. Is there a better way to read/write to local files with Blaze?

 

Test Code (an excel file with jxl.jar imported):

 

a1 is some Workbook;
a1.getWorkbook(io_File.newInstance("C:\\Blaze\\Advisor67\\Test Excel\\Book1.xls"));
b2 is some Sheet;
b2 = a1.sheet[0];
print("" b2.getCell(1,1));

 

Runtime Error:

 

com.blazesoft.engines.rules.NdEvaluationException: Evaluation error
Expression produces unexpected value: unknown.
unknown while evaluating t.newInstance("C:\\Blaze\\Advisor67\\Test Excel\\Book1.xls")

 

The ultimate goal is to read an excel file, format the data into xml test files, and then to read those xml files for test runs.

Thank you.

Outcomes