Creating workbook from DataSet: how to import only selected columns


#1
  1. Is there a way to import only selected columns from the dataset in to the workbook? I.e. can I just specify(by name, not by column #) that I want to return only DATA_COLUMN7, DATA_COLUMN1 and DATA_COLUMN3(in that sequence) from the current dataset.

    2) can smart markers be used for for the taske sepcified in question #1? are smart markers efficient with large dataset? 5000-10000 rows? (The application is for a webserver with potentially high load).

    3) if I don’t want to use designer file, what would be the best solutio for #1?

    Thanks!
    Igor

#2

Dear Igor,

Smart makers can be used for your case. It can process 5000-10000 rows within a few seconds.

If you don’t want to use designer file, you can try:

1. Retrive data from those columns and use Cell.PutValue to put them to a file.

2. Create a DataView based on your dataset and use Cells.ImportDataView to import data.

In future release, I will add a new Cells.ImportDataTable method to let you import a single column of a DataTable.


#3

Hi, Laurence!

Thanks for quick responce. Few more questions:
how does efficiency of using a dataview compares to:
1) smart markers with designer created in advance
2) smart markers with designer file created on the fly

Also, I need to format some columns(each cell in the column) based on the cell value. I.e. if the column can have positive/negative numbers, I’ll need to change color of positive #'s to green and color of negative #'s to red.
What would be a goood way to do this?

Thanks!
Sincerely,
Igor


#4

Hi Igor,

I have already implement an ImportDataColumn method to meet your need. It will be released at the start of next week. So you don’t need to care about dataview and smart markers now.

If you want to format the cell based on the cell value, I suggest to create a designer file with conditional formattings. That will be easier and faster.


#5

Thanks!

Assuming the average number of columns is 20 and number of rows is between 1000 and 5000, could you please tell me if calling ImportDataColumn for each of the columns, will be much less efficient compared to calling ImportDataTable?


#6

ImportDataColumn method is now available in v2.7.5.

In your case, I don't think there is much difference. You can download the hotfix and have a try.