Help: Infragistics Excel

Posted by FCC on 09-Apr-2015 08:29

Hello,

I need some help with: I need to shift down all the rows from a generated excel file and insert new rows on top.

Then, I have to add new information in these new rows. Can somebody help me please with some samples?

Thank you in advance!

All Replies

Posted by Elsworth Burmeister on 09-Apr-2015 08:37

Are you generating this excel file from an unltragrid using excel exporter?
 
At what stage do you want to amend this excel file?
 
If you want to amend it after export then you would need to use com-handle or a class that manages manipulation with excel I would think.
 
If you want to dump the data the way you want it. The excel exporter dumps all the information what’s in a grid. So you would have to manipulate your grid to the way you want your spread sheet to look like. Otherwise you would have to use the events in the excel exporter. /*this way I don’t know if its possible*/
 

Elsworth Burmeister

Developer - Managed Services

Cell: +27 83 777 3072 Email: eburmeister@elcb.co.za

 

ELCB Information Services (Pty) Ltd

Customer Service Email  elcb@elcb.co.za · www.elcb.co.za

E A S T  L O N D O N

Tel: +27(43)  704 0700

Fax: +27(43) 704 0701

J O H A N N E S B U R G

Tel: +27(10) 035 0310

Fax: +27(10) 035 0311

P O R T  E L I Z A B E T H

Tel: +27(41) 373 0529

Fax: +27(86) 650 0135

Disclaimer


[collapse]
From: unu_mi [mailto:bounce-unu_mi@community.progress.com]
Sent: 09 April 2015 03:30 PM
To: TU.OE.Development@community.progress.com
Subject: [Technical Users - OE Development] Help: Infragistics Excel
 
Thread created by unu_mi

Hello,

I need some help with: I need to shift down all the rows from a generated excel file and insert new rows on top.

Then, I have to add new information in these new rows. Can somebody help me please with some samples?

Thank you in advance!

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Roger Blanchard on 09-Apr-2015 08:53

Hmm, we use the Infragistics Excel control heavily to generate reports. I am not sure you can "shift down rows".

When writing to a cell you would use code similar to the following;

oWorksheet:Rows[iRow]:Cells[iColumn]:VALUE = "TEST"

Basically, you are telling the worksheet what row/column.

If you have a Worksheet object and it has data I am not sure you can shift everything down without writing logic to loop through all the cells and move the cell values.

Posted by Elsworth Burmeister on 09-Apr-2015 08:59

I would suggest you format the grid the way you want the excel to look like, so if you have a dataset bound to grid and you need to insert 5 empty lines to move rows down in the grid… create these blank rows in the grid or the dataset and it will follow through to the excel.
 
 

Elsworth Burmeister

Developer - Managed Services

Cell: +27 83 777 3072 Email: eburmeister@elcb.co.za

 

ELCB Information Services (Pty) Ltd

Customer Service Email  elcb@elcb.co.za · www.elcb.co.za

E A S T  L O N D O N

Tel: +27(43)  704 0700

Fax: +27(43) 704 0701

J O H A N N E S B U R G

Tel: +27(10) 035 0310

Fax: +27(10) 035 0311

P O R T  E L I Z A B E T H

Tel: +27(41) 373 0529

Fax: +27(86) 650 0135

Disclaimer


[collapse]
From: rblanchard [mailto:bounce-rblanchard@community.progress.com]
Sent: 09 April 2015 03:55 PM
To: TU.OE.Development@community.progress.com
Subject: RE: [Technical Users - OE Development] Help: Infragistics Excel
 
Reply by rblanchard

Hmm, we use the Infragistics Excel control heavily to generate reports. I am not sure you can "shift down rows".

When writing to a cell you would use code similar to the following;

oWorksheet:Rows[iRow]:Cells[iColumn]:VALUE = "TEST"

Basically, you are telling the worksheet what row/column.

If you have a Worksheet object and it has data I am not sure you can shift everything down without writing logic to loop through all the cells and move the cell values.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Roger Blanchard on 09-Apr-2015 09:18

What Elsworth is suggesting would be a good approach.

Posted by FCC on 10-Apr-2015 00:28

Thank you all, actually I need to insert on top 3 extra rows with company information. But I don't need this in the ultragrid, only in the excel export. I use something like ultraGridExcelExporter:Export( gridName, fileName).

This thread is closed