OfficeWriter data marker for sheet name - officewriter

We only have the Template DLL v.8 installed, we use Microsoft SSIS v.2008R2 to process the data and then use a script task to bind the data to a template.
I have a need to produce a workbook with multiple sheets, the sheet names need to be dynamic.
Can you use a data marker on the sheet name?

Yes you can. You mention version 8, but you don't specify if it is 8.0 or you have a minor version of v8.
Either way this feature was introduced in v8.5.0 of ExcelWriter.
See the OfficeWriter Change log that states:
ExcelTemplate allows data markers in tab names of XLSX/XLSM files
For more specific documentation on using datamarkers in sheet tabs see SoftArtisan's documentation
Just realize the Excel Sheet names have limitations that Excel controls, such as max number of characters, so you by limited in the data marker names you can use. One way to get around that issue would be to use ordinal syntax.

Related

Columns Layout export

Sparx Enterprise Architect offers the possibility to define custom layouts for list views in the package browser and to save these definitions. When exporting a Project file (*.eap) via xmi, these definitions are not included in the export-file and thus lost. I wonder whether there exists a way to transfer columns layout definitions between two EA-Projects.
Many thanks in advance for every hint!
As Geert suggested the layout is stored in the registry.
[HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\OPTIONS]
holds a key PKG_BRWSE_LAYOUTS with the comma separated list of profile names (so you better don't use comma in your profile name ;-).
The detailed information is stored in
[HKEY_CURRENT_USER\Software\Sparx Systems\EA400\EA\EA1200Workspace\BCGPGrids\EA_ELEMENT_LIST_<name>BCGPGrid-0]
where <name> is the according profile name.
For a sample layout here they looked like
"Columns"=hex:11,00,01,00,00,00,01,00,00,00,01,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,01,00,00,00,01,00,00,00,01,00,00,00,01,00,00,00
"ColumnWidth"=hex:11,00,16,00,00,00,04,01,00,00,50,00,00,00,50,00,00,00,50,00,\
00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,\
00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00,50,00,00,00
"ColumnOrder"=hex:08,00,00,00,00,00,01,00,00,00,06,00,00,00,02,00,00,00,0d,00,\
00,00,0e,00,00,00,0f,00,00,00,10,00,00,00
"Groupping"=hex:00,00
"LastFieldChooserPos"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"IsFieldChooserVisible"=dword:00000000
"IsFieldChooserThemed"=dword:00000001
"SortColumns"=hex:00,00
I have to leave that to you to decipher the coding used here. But for a pure ex-/import you probably don't need to do that.

How to download normal word export not grid layout export from Jasper soft v6.3.1

I am using Jasper soft 6.3.1 and Jasperserver 6.3.0.
I am generating a report book using Jasper.
When I export report book into .docx report, this word file contains grid. Its not like normal document.
How I can download docx like normal ms word document?
Is there any alternative?
Do I need to go for Aspose.com solution, if yes, then how ?
Jasper will always export an docx-output in a table/grid structure. Unfortunately there is no other way.
You can achieve your requirements using Aspose.Words for JasperReports. The output document will be according to the elements of your report. Please read the documentation of Aspose.Words for JasperReports. I work with Aspose as Developer evangelist.
Yes, you will need to use a 3rd party library to achieve this. Aspose.Words or any other similar library would do the trick but I strongly suggest that you first take a look at this library that allows you to create a template in MS Word, with all the necessary formatting and placehoders for the data. At runtime this template is filled with data. You can then choose the output format in .docx, .pdf or .xps format.
// Instancing report engine, by assigning the data source
DocumentGenerator dg = new DocumentGenerator(DataAccess.GetOrderById(7));
// Generating report by specifying the report template and the resulting report (as file paths)
dg.GenerateDocument("example.docx", "example_output.docx");

Ordering Meetings Fields For SuiteCRM Calendar

In the SuiteCRM calendar the default for Meetings is to show the SUBJECT of the Meeting followed by the MEETING OBJECTIVES.
I want to modify it so that on the first line it shows the MEETING OBJECTIVES and the second line is the SUBJECT of the Meeting.
I've looked in modules/Calendar and modules/Meetings and I'm still a bit lost. Any idea on which file I need to modify to be able to change the order of these two fields?
Calendar module files are placed inside "modules/Calendar" folder. It contain tpl,js and php classes and functions for calendar module. "get_activities" function inside "modules/Calendar/CalendarActivity.php" actually load activities. You can change text here before it assigned to tpl/js file.
Further more you can also do changes inside this file: "modules/Calendar/Calendar.php" , see function "load_activities"
I think changing in JS should be last option because that is to complex and changes there need more time then doing it in alternative way in PHP file.

Set xlsx to recalculate formulae on open

I am generating xlsx files and would like to not have to compute the values of all formulae during this process.
That is, I would like to set <v> to 0 (or omit it) for cells with an <f>, and have Excel fill in the values when it is opened.
One suggestion was to have a macro run Calculate on startup, but have been unable to find a complete guide on how to do this with signed macros to avoid prompting the user. A flag you can set somewhere within the xlsx would be far better.
Edit: I'm not looking for answers that involve using Office programs to make changes. I am looking for file format details.
The Python module XlsxWriter sets the formula <v> value to 0 (unless the actual value is known) and the <calcPr> fullCalcOnLoad attribute to true in the xl/workbook.xml file:
<calcPr fullCalcOnLoad="1"/>
This works for all Excel and OpenOffice, LibreOffice, Google Docs and Gnumeric versions that I have tested.
The place it won't work is for non-spreadsheet applications that cannot re-calculate the formula value such as file viewers.
If calculation mode is set to automatic, Excel always (re)calculates workbooks on open.
So, just generate your files with calculation mode set to "Automatic".
In xl/workbook.xml, add following node to workbook node:
<calcPr calcMode="auto"/>
Also check Description of how Excel determines the current mode of calculation.
You can use macros as suggested, however you will create a less secure and less compatible workbook without avoiding user interaction to force calculation.
If you opt by using VBA, you may Application.Calculate in Workbook_Open event.
In your XML contents, simply omit the <v> entity in each cell that have a formula, this will force Ms Excel to actualize the formula whatever the Excel options are.
Instead of:
<c r="B2" s="1">
<f>SUM(A1:C1)</f>
<v>6</v>
</c>
Have:
<c r="B2" s="1">
<f>SUM(A1:C1)</f>
</c>
If you have to actualize formula in an already given XML contents, then you can code easily a small parser that search for each <c> entities. If the <c> entity has a <f> entity, then delete its <v> entity.
Faced the same problem when exporting xlsx'es via openxml (with fastest SAX + template file approach w/o zip stream rewinds).
Despite Calculation option=Automatic, no recalculation on opening the file.
Furthermore no recalculation via Calculate Now and Calculate Sheet buttons.
Only upon selecting the cell and pressing enter ;(
Original formula: SUM(A3:A999)
Solution:
Create an internal hidden sheet
Place end row number (999 in my case) into any cell in hidden sheet (P1 in my case)
Reference row number in the cell via INDIRECT operator
Final formula: SUM(A3:INDIRECT("A"&Internal!P1))
Please refer to the attached gifs
before.gif
after.gif
P.S.
Theoretically, in P1 you can implement dynamic row number calculation via smth like =LOOKUP(2;1/(Sheet1!A:A<>"");ROW(Sheet1!A:A)), but my customers were satisfied with hardcoded row number solution

Exporting data in enhanced Grid to csv or xml format using dojo

In my project we are using dojo framework in UI. We are having a functionality to exporting the data in the enhanced grid into excel/csv files. In the dojo toolkit, they are binding the id in the textarea but i need those values in the excel/csv file...can any one help in this issue...? if possible pls tell me how to export the enhanced grid data to excel/csv files...
If you are already using the Enhanced Data Grid, you should be able to include the exporter plugin - dojox.grid.enhanced.plugins.exporter.CSVWriter - to get the CSV text.
This will give you access to two main functions exportGrid and exportSelected that will take the contents and export them as CSV text.
Unfortunately that doesn't get them as a separate file (click to download), just the formatted text in a textarea (or whatever).
To get a "click to download CSV function), you could write a servlet/jsp proxy, which would take a POST from your page with the CSV text (from the plugin above) as part of the form and simply copy it back out with the correct headers to make it appear as an attachment.
response.setContentType("text/csv"); response.setHeader("Content-Disposition","attatchment;filename=name.csv")
This would require something server side though.. and at that point, you may want to consider having a servlet simply produce the CSV text directly.
http://dojotoolkit.org/reference-guide/dojox/grid/EnhancedGrid/plugins/Exporter.html