opening sod in xls format.
#1
Posted 13 January 2009 - 02:42 AM
I am new to espredengine API , i have designed some reports in spreadsheet when i tried open it in XLS format from my appliction i have some problem.
The size of the file reduced and i was not able to reuse the SOD file and i couldnt get the XLS file also my code is
import java.io.File;
import com.f1j.ss.*;
import java.io.*;
public class sod
{
public void doGet() throws Exception
{Document doc = null;
FileOutputStream fos = new FileOutputStream ("c:\\cash.sod");
DataOutputStream out = new DataOutputStream(fos);
try {
File templateFile = new File("c:\\cash.sod");
doc = new Document(null, templateFile, new DocumentOpenCallback());
doc.getLock();
doc.fileSaveAs(out, DocumentType.EXCEL_97_REPORT_VIEW, newDocumentSaveCallback()); }
catch (Exception e){System.out.println(e.getMessage()); }}
public static void main(String args[ ])
{ try{ sod m=new sod(); m.doGet();}
catch (Exception e){System.out.println(e.getMessage());}}}
Kindly help me in solving this issue.
Thanks in advance
Nandha
#3
Posted 13 January 2009 - 10:22 AM
I changed the code as u said now, iam getting this error,there is no jdbc class files in the given jar.
do we need to create the datasource in the coding or it will use wt is available in the sod file.
My xls is generated with 0 kb
I have also attached the error log that i got.
Kindly help me in solving this issue.
Regards,
Nandha
#4
Posted 13 January 2009 - 10:44 AM
Rob




MultiQuote
