Hi,
I have smart markers in all sheets. The name of smart markers will be same in all sheets but the values will be different.
When I add new sheet in workbook I want to process it’s smart markers.
I am not able to get the WorkbookDesigner from workbook.
Please suggest me how can I process such kind of smart markers.
Thank You.
Hi,
Do you use Aspose.Cells for Java. Well, every WorkbookDesigner has its internal Workbook object and I think you may utilize it for your requirement.
E.g.,
//Instantiating an WorkbookDesigner object
WorkbookDesigner designer = new WorkbookDesigner();
designer.open(designerFilePath);
Workbook workbook = designer.getWorkbook();
Worksheet worksheet1 = workbook.getWorksheets().addSheet("mysheet");
//.
//.manipulate data
//.
//Set the data sources for the designer spreadsheet
designer.setDataSource(rs);
designer.setDataSource(rs1);
//Process the smart markers
designer.process();
//.
Thank you.
Hi,
I don’t have any designerFilePath in order to perform
designer.open(designerFilePath);
I am creating workbook as new Workbook().
I want designer of this workbook.
How can I get it ?
I am using aspose.cells 1.9.4.13
Please help.
Thank You.
Kailas
Hi Kailas,
Sure you can get it by WorkbookDesigner, Following code may help you some:
WorkbookDesigner wd = new WorkbookDesigner();
Workbook wb = wd.getWorkbook();
Worksheets wsheets = wb.getWorksheets();
Cell cell = wsheets.getSheet(0).getCells().getCell(0,0);
cell.setValue("&=$Variable");
wd.setDataSource("Variable", "valuecreatedbook");
wd.process(0, true);
cell = wsheets.addSheet().getCells().getCell(0,0);
cell.setValue("&=$Variable");
wd.setDataSource("Variable", "valuecreatedsheet");
wd.process(1, true);
wb.save("test.xls");
Thank You Johnson.
It’s pretty simple now.