We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › does not work after exporting
Page Index Toggle Pages: 1
does not work after exporting (Read 845 times)
does not work after exporting
Dec 15th, 2009, 7:27am
 
do anybody knows why this is not working after exporting it and opening it on a browser? the xls file is just numbers and names. it works well on processing.


import de.bezier.data.*;
XlsReader reader;
PFont v22;
PFont v48;

String names[][] = new String [12][118];


void setup() {
smooth();
size(500,500);
v22 = loadFont("verdana_24.vlw");
v48 = loadFont("verdana_48.vlw");
reader = new XlsReader( this, "a.xls" );
background(0);
readall();
}



void draw() {
     


}

void readall(){
 
for(int i = 1;i<=11;i++){
  fill(random(0,255),random(0,255),random(0,255));
    for(int j = 1;j<=117;j++){
      fp(i,j,-150+i*150,j*10);
    }
}  
 
 
}

void fp(int x, int y, float px, float py){ //thesh keliou: x/y // pou na emfanistei: px/py
 reader.firstRow();
 reader.firstCell();
 for(int j = 1;j<y;j++){
   reader.nextRow();
 }
 for(int i = 1;i<x;i++){
   reader.nextCell();
 }
 textFont(v48,15);  
 
 String[] list = split(reader.getString(), "."); // kratame mono to 1o meros an xorizetai me . (teleia)
 
 text(list[0], px, py,140,15);
 
 names[x][y] = list[0];
 
}
Re: does not work after exporting
Reply #1 - Dec 15th, 2009, 9:47am
 
Any error in the Java console?

I get the XLS file is included in the jar in the data folder, right?
Re: does not work after exporting
Reply #2 - Dec 16th, 2009, 2:32am
 
i get this:
ERR, getString(): you are reading a numeric cell as string.

but, even without it it will not run
the xls is included in the data folder of the sketch but do i have to put it manualy in the applet folder after i have exported it?
Re: does not work after exporting
Reply #3 - Dec 16th, 2009, 2:43am
 
Not sure what is going on.
I think the file is included in the jar file (you can check it by opening the jar with your favorite archive software).
Perhaps the XlsReader can't read in a jar file.

Note: this is not a syntax question, such problem should be submitted in the Other Libraries section instead, since it uses a 3rd party library.
Re: does not work after exporting
Reply #4 - Dec 19th, 2009, 7:38am
 
XlsReader will not work in (normal) applets. The underlying framework (poi.apache.org) tries to gain read-write access which is not allowed for unsigned applets.

I'm looking for a fix and will report back ...
Page Index Toggle Pages: 1