Hi Community,
I have a code that is working absolutely fine on a windows server. We were migrating our environments from Windows to Linux but the file share still is a Windows SMB. The Code works like a charm in windows and breaks in Linux. I tried using the path formatting so that Linux recognizes but still a failure. Any inputs would be appreciated.
-----------------------------------------Here is the code--------------------------------
//Get the Blank Excel template from the shared path
String fileNamePath = props.getProperty("document.dynamic.userdefined.DDP_TemplateFileNamePath");
String dataSheet = props.getProperty("document.dynamic.userdefined.DDP_DataSheet");
com.aspose.cells.Workbook wb = new com.aspose.cells.Workbook(fileNamePath);
// Open the RawData sheet
com.aspose.cells.Worksheet worksheetRawData = wb.getWorksheets().get(dataSheet);
com.aspose.cells.Cells cellsRawData = worksheetRawData.getCells();
// Import flat csv
int firstRow = 1;
int firstColumn = 0;
cellsRawData.importCSV(is, "|#|", true, firstRow, firstColumn);
// remove the first (empty) sheet
wb.getWorksheets().removeAt(0);
// Save to stream
ByteArrayOutputStream baos = new ByteArrayOutputStream();
wb.save(baos, SaveFormat.XLSX);