How can I use a csv file as a parameter data source? - pentaho-report-designer

I would like to use a parameter with a csv data source. The csv would be whole numbers. I have been reading a lot but there is nothing about that. Thank you very much
So far I have made parameters with a query as a data source but this makes the parameter much slower

you can put a data source xml or excel format
In the menu, clicking on add -> add datasource-> xml or table

Related

Adding a custom template for extracting data in excel

I'm currently working on a project which one of its modules is to upload a custom excel file then my code should recognize the excel file's template.
then Users should be able to determine which data is put in which excel field.
I am writing this with asp.net mvc. and so far I'm screwed. anyone knows where should I start? or what library I should Use? I'd really appreciate the help
For Fetching Excel File data in c# , I recommend you to study about Aspose.Cells, It is a third party Dll, There API is Easy to understand and Very Easy to implement.
In that you can Fetch Your Excel Files as
Workbook - Full Excel File
Worksheets - Sheets Inside Excel File
Cells - Group of Excel Cell
Cell - A single Cell which you can access in the form of 2D Array like A1 Cell of Excel Sheet Will be Cell[0][0];
It also gives you facility to put formulaes, Sorting, Blank Row Deletion and many more Things
Here you can easily Export your Excel sheet in a DataTable and vice Versa
Have a look at it is Easier to use.Thanks
https://github.com/closedxml/closedxml/wiki/Showcase
this library was close to what I needed.

Parse Excel to BizTalk and save it in database

How to use BizTalk To disassemble Excel File .. Then Save these data in Database?
Can anyone provide me detailed steps of how to achieve this or any existing link for the same.
Wow - this is pretty open ended!
The steps you would generally take are:
1) Generate a Flat File schema that represents your excel file structure. As it's excel I'm assuming that your file is actually a CSV?
2) Create a custom pipeline that implements a flat file disassembler to convert CSV to Xml.
3) Using the WCF-LOB adapter, generate schemas for the Table you want to insert to. You might want to front this with a stored proc. I'm assuming an SQL or ORACLE database as you don't say what DB you are using!
4) Map your input Xml file to your Table/SP Schema.
5) Send your insert request to your DB (advise using Composite operations or a User defined table parameter to to avoid looping through your Xml and sending line-by-line!)
This is pretty high-level but frankly you are asking quite a few questions in one go!
HTH
In case it isn't not a CSV flat file as assumed by teepeeboy, and it is actually a XLS file you want to parse you will need something like FarPoint Spread for BizTalk. We've successfully used this to parse incoming XLS files attached to e-mails. The other option would be to write your own Pipeline component to do it but would be a lot of work. Other than that the steps that teepeeboy outline are what I would do as well.

Export data to Excel Part By Part

I have a huge dataset value in JRDatasource object and am not able to export it to Excel as it will give me memory out of space error. So am planning to split the JRDatasource object and export the data part by part. Any idea or suggestion on how to implement this? Or any other way suggested also fine for me. Thanks in advance.
I dont know much about JRDataSource, but I'll offer another solution.
Take a look at Apache POI library which enables you to create excel files on-the-fly.
So you can read from the data source element by element and persist them on a excel file.

Export Grouped AdvancedDataGrid as CSV text

I'm trying to export an AdvancedDataGrid to CSV. This is easy enough for non-hierarchical data, but when using a HierarchicalCollectionView to show treed data it gets trickier.
Any suggestions on how to access each of the cells just as they appear on screen when all of the nodes are expanded?
If you've expanded all the nodes like you mentioned (you can use the AdvancedDataGrid's expandAll() function for this), you can then run the AdvancedDataGrid through the following CSV export utility class to access each of the cells as they appear on the screen:
https://onyxmueller.net/2011/08/20/advanceddatagrid-csv-export-utility-class/
However, I've found when dealing with a HierarchicalCollectionView as the data provider, that it is better to write some custom logic to "flatten" the data for CSV export.
Hierarchical data doesn't map well to CSV which is essentially flat. You are essentially trying to write nested objects into spreadsheet.
Accessing the data isn't that hard, you can just recursively work through getChildren() in the collection.
The hard bit is writing it into the CSV file in a way that can be retrieved later. The only really good ways of doing this is by ignoring the fact that you are writing to CSV. As soon as you get to the children field of the root object you are going to end up writing some horrible array parsing mechanism.
My solution? Write it out to JSON, and stick it in a single cell of the CSV. You'll save yourself a ridiculous amount of pain in the long run.

List of objects to Excel Spreadsheet?

Anyone know of some code out there that does this already? I have a bunch of pages with data grids on them in an admin website they want to export them to Excel, was hoping someone had this written already - or if not I'll post mine when I am done.
Excel can open files in the format of CSV and XML - it can also generate the schema file.
if you have data grids then the chances are you have data sets.
There is a method on the dataset to output as XML.
you probably have to use an xmlWriter to save the file.

Resources