on 06-06-2016 5:24 PM
Dear Friends,
In our one of the application we have implemented the Excel upload functionality. After browsing the excel file , on click of button event we are displaying the content in a table. Now the strange issue is on our sandbox server it is working but on Q , D and P , it is not working. We have some SP level difference between Sandbox and other system . What could be the problem and solution ?
Sandbox : 7.31 SP Level 12
Quality : 7.31 SP level 17
Regards,
Mayank
nothing do to with sap.
excel handling is all on you.
not working is too vague. please detail
can't u debug?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mr. Wu,
Thank you for your reply. I debugged the code and problem is same code is working with system having lower SP level (12).
If you check the below mentioned code , the highlighted line
Sheet sh = wb.getSheet(0) is not being executed with SP 17 version. but same line is working in SP 12. After the execution of this line control is jumping to Catch statement.
if (path != null) {
// Collection clearer = null;
wdContext.nodeSyngoExcelUpload().invalidate(); //bind(clearer);
Workbook wb;
try {
wb = Workbook.getWorkbook(new File(path));
Sheet sh = wb.getSheet(0);
int columns = sh.getColumns();
int rows = sh.getRows();
int i = 0;
for (int j = 1; j < rows; j++) {
xlsElem = wdContext.nodeSyngoExcelUpload()
.createAndAddSyngoExcelUploadElement();
Cell c1 = sh.getCell(i, j);
xlsElem.setSernr(c1.getContents());
....
....
....
...
...
Any help ?
Hi Jun,
We have modified our code to :
Workbook wb;
try {
wb = Workbook.getWorkbook(wdContext.currentContextElement().getRessource().read(false));
Sheet sh = wb.getSheet(0);
int columns = sh.getColumns();
int rows = sh.getRows();
int i = 0;
for (int j = 1; j < rows; j++) {
xlsElem = wdContext.nodeSyngoExcelUpload().createAndAddSyngoExcelUploadElement();
Cell c1 = sh.getCell(i, j);
xlsElem.setSernr(c1.getContents());
cell c2 = sh.getCell(i + 1, j);
xlsElem.setMatnr(c2.getContents());
Cell c3 = sh.getCell(i + 2, j);
xlsElem.setEqunr(c3.getContents());
.....
.....
Still is it wrong ?
It is working on sandbox but not on upgraded SP17 systems. Do you think that there is some security issue on systems.
Regards,
MS
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.