[Openroad-users] Transferring data into an Excel spreadsheet

Dominique PLU dominique.plu at crayvalley.com
Fri Feb 29 20:33:26 EST 2008


Hi

We use many application that export to excel our data in and out for 
people (majority salesman) 
without ERP access

Create an external object mapped to excel activeX (our example cvribaexpO)

hope this help you, you can also look at msdn for information about 
attribute and the simple way
for function is to use the macro recorder inside excel and record manual 
action 

Best regards

in open road :

declaration
        oXlApp                          = cvribaexpO!Application;
        oXlWbk      = cvribaexpO!Workbook;
        oXlSht      = cvribaexpO!Sheets collection Of 
cvribaexpO!Worksheet;
        oXlWsh      = cvribaexpO!Worksheet;
        oXlRng      = cvribaexpO!Range;

main code  :

                // Create excel file and dump this array
                oXlWbk      = oXlApp.Workbooks().Add(); // create a new 
workbook 
                oXlSht      = oXlWbk.worksheets();      // pointer the the 
worksheet array
                oXlWsh      = oXlSht[1];                // pointer to the 
first worksheet
                oXlWsh.Name = LEFT(aLogdatev , 31) ;            // name 
the first worksheet


                // Force cell range of sheet to be text only
                oXlWsh.Range(oXlApp.Cells.Item(2,1), 
oXlApp.Cells.Item(maxrows + 1,7)).NumberFormat =  '@' ;
                oXlWsh.Range(oXlApp.Cells.Item(2,9), 
oXlApp.Cells.Item(maxrows + 1,19)).NumberFormat =  '@' ;
                oXlWsh.Range(oXlApp.Cells.Item(2,8), 
oXlApp.Cells.Item(maxrows + 1,8)).NumberFormat =  '0.00' ;

                // Put Header columns
                oXlApp.Cells.Item(1,1).Value      = 'CUSTOMERNAME' ;
                oXlApp.Cells.Item(1,2).Value      = 'VATRG' ;
                oXlApp.Cells.Item(1,3).Value      = 'CODE' ;
                oXlApp.Cells.Item(1,4).Value      = 'RECPTDT' ; 

                // fill like an array ... using loop etc 

                // save excel spreadsheet
                        oXlWsh.Activate();
                aLongName = globalpath + 
squeeze(companykey)+'\'+aLogdatev+'.xls';
                oXlWbk.SaveAs(aLongName,,,,,,,,,,);
                        oXlWbk.Close();
                oXlApp.Quit();
                oXlApp = Null;



Cordialement

Dominique PLU ,  Project Manager
Département Informatique Division
Pole Infrastructure Adage
CRAY VALLEY - Groupe TOTAL
Site de Villers Saint-Paul BP.13
60 870 RIEUX. France
dominique.plu at crayvalley.com



Kim Ginnerup <kgi at bording.dk> 
Envoyé par : openroad-users-bounces at peerlessit.com
29/02/2008 10:08
Veuillez répondre à
International OpenROAD Users <openroad-users at peerlessit.com>


A
International OpenROAD Users <openroad-users at peerlessit.com>
cc

Objet
Re: [Openroad-users] Transferring data into an Excel spreadsheet






I would really like to har about this as well.
I have used copytoclipboard with success.
But would like to make a more automated way I need to do graphs as well
 
Regards,
 
Kim
 

Fra: openroad-users-bounces at peerlessit.com 
[mailto:openroad-users-bounces at peerlessit.com] På vegne af Allan Biggs
Sendt: 29. februar 2008 09:40
Til: openroad-users at peerlessit.com
Emne: [Openroad-users] Transferring data into an Excel spreadsheet
 

I have to report some data in an excel spreadsheet - I can think of many 
ways to do this outside of OpenROAD - but have decided that OpenROAD will 
be the simplest. 

I wonder if anyone has a simple example that they would be prepared to 
share to get me started? 

All I want to do is place some values into specified cells and save the 
spreadsheet. 

Thanks in advance Allan
 
This communication is for use by the intended recipient and contains
information that may be Privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender by
return e-mail and delete this e-mail from your system. Unless explicitly
and conspicuously designated as "E-Contract Intended", this e-mail does
not constitute a contract offer, a contract amendment, or an acceptance
of a contract offer. This e-mail does not constitute a consent to the
use of sender's contact information for direct marketing purposes or for
transfers of data to third parties.
 
Francais Deutsch Italiano  Espanol  Portugues  Japanese  Chinese  Korean
 
           http://www.DuPont.com/corp/email_disclaimer.html
________________________________________________________________
OpenROAD-Users mailing list

You can maintain your subscription here:
http://www.peerlessit.com/mailman/listinfo/openroad-users

To unsubscribe click on this link
mailto:openroad-users-unsubscribe at peerlessit.com&subject=unsubscribe

To subscribe click on this link
mailto:openroad-users-subscribe at peerlessit.com&subject=subscribe 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20080229/8868619d/attachment.html 


More information about the Openroad-users mailing list