Paul:
To start, I use Netbeans 8.2
IDE to develop the software. I do so because I use tons of input screens that interact with several Derby Databases --basically, a CRM type program, and I'm more comfortable with the GUI developer in Netbeans.
The variables are PRO1 to PRO10 (ADMIN Section on top of Spreadsheet); PRO1X to PRO15X (Product section below the Admin). I use a Derby DB which places data into these variables.
Then these variables are assigned to a row/cell location. Unfortunately, the amount of code I can post is limited to only a certain length so some of the codes were omitted. But the basic block used for placing into the spreadsheet is as follows. I use the same code for every row/cell entry. This is a DRAFT software program that I will clean up and improve once I have all the parts working. The problem is that the below code works (PRO1 to PRO10 and PRO1X to PRO5X) fine until it gets to PRO6X to PRO15X. The variables are PRO1X = Product Name, PRO1XQ = Product Quantity. These are posted to the spreadsheet (the Excel Spreadsheet has lookup tables for Costs, Markup, and Margin). I have tried everything I could think of but the problem is still there. Normally the code should place the database data from each variable to the location I specified in the code --and it does up to PRO5X. This program is a java "learning" program for me that I am doing to expedite and automate some of my own workloads. I don't do java professionally --just amateur stuff.
You can substitute any strings for the variables--doesn't matter since we're just placing strings to cell locations. I can also send you the entire java file. Email:
txguy5199@gmail.com.
//tubes entries Line 13 of Spreadsheet (line 12 in POI)
if (PRO1X.length()>0){
XSSFRow row10 = sheet.getRow(12);
cell = row10.getCell(4);
style2 = cell.getCellStyle();
style2.setFont(font3);
cell.setCellStyle(style2);
cell.setCellValue(PRO1X);
XSSFRow row11 = sheet.getRow(12);
cell = row11.getCell(6);
style2 = cell.getCellStyle();
style2.setFont(font3);
cell.setCellStyle(style2);
cell.setCellValue(PRO1XQ);
}