You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Raman Singh <ra...@gmail.com> on 2012/11/14 04:26:18 UTC

error in reading .xlsm file using POI

Hi Experts,

I am trying to read a .xlsm file using POI.
My code is:

import java.io.*;
import java.util.List;
import jxl.*;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.read.biff.BiffException;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.xssf.usermodel.*;;

public class ReadExcelSheet {

public static void main(String[] args) throws IOException {
		final Workbook wb;
		FileInputStream fileIn = new 
FileInputStream("C:\\Users\\my\\Desktop\\ExcelPORead\\Purchace.xlsm");

		wb = WorkbookFactory.create(fileIn); // Error in this line
		
	}

}


and I am getting an error at the line "wb = WorkbookFactory.create(fileIn)", it 
says to "configure Build Path". 
I am using Eclipse and downloaded poi-ooxml-3.5-beta5.jar and add it to the 
Build path.
But I am not getting what I need to do to make it working.

Kindly suggest me how to remove this error or If you have any better way to read 
the .xlsm files in Java.

Thanks for your response.

Regards,
Raman


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org