We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Put param in Cells

Hi all, i’m newbie.
How to put param in code and getParam in excel use WorkbookDesigner?
Ex in word: getMailMerge().execute(arrayNames, arrayValues);
and use MergeField in word getValue.
pls help me.
Thanks and Sory for my English @@.

Hi,


Well, as I could understand your requirements, I think you may make use of Smart Markers feature provided by Aspose.Cells product, smart markers behaves like pointers and you will insert them into your template file, extract data to fill a dataset or from variables / arrays, objects etc. using your own code, set it as data source for the WorkbookDesigner object, process it and you will see the data is extracted and is displayed in the cells against your markers.

Please see the sample code on Smart Markers feature via Variable arrays for your reference:
e.g
Sample code:

WorkbookDesigner report = new WorkbookDesigner();
Worksheet w = report.getWorkbook().getWorksheets().get(0);
w.getCells().get(“A1”).putValue("&=$VariableArray"); //You may also place this Smart Marker into a template file manually in Ms Excel.
report.setDataSource(“VariableArray”, new String[] { “English”, “Arabic”, “Hindi”, “Urdu”, “French” });
report.process(false);
report.getWorkbook().save(“e:\test2\out_varaiblearray1.xlsx”);


Please see the topic for your complete reference for your needs:
http://www.aspose.com/docs/display/cellsjava/Smart+Markers


Hope, this helps you a bit.

Thank you.

Hi Amjad Sahi, Thks for reply.

Worksheet w = report.getWorkbook().getWorksheets().get(0); w.getCells().get(“A1”).putValue("&=$VariableArray");
I don’t want put value for cell “A1”, i want set as DataSource
report.setDataSource(“NameVariable”,“ValueVariable”);
and in MS Excel i’ll put into one cell anywhere.
thanks…!

Hi,


Well, Aspose.Cells’s Smart Markers feature is based on Smart Markers I am afraid which you place into your desired cells, so the data is processed and your marker cells should be filled out accordingly. If you do not want your data should start placing from A1 cell, you may specify your desired other cell accordingly.

Moreover, if you need to simply import arrays, arrays list, result sets etc., you may use Aspose.Cells Data importing options for your needs, see the document for your reference:
http://www.aspose.com/docs/display/cellsjava/Importing+Data+to+Worksheets

Thank you.

Ok, thanks Amjad Sahi !

Hi,


You are welcome, should you have any further query, feel free to contact us any time, we will be happy to assist you soon.

Thank you.