copy data Excel in Dw

I want to input data from an Excel in a datawindow. 
How can I do ?
0
nicolas_S
5/23/2003 2:55:34 PM
sybase.powerbuilder.datawindow 28057 articles. 5 followers. Follow

1 Replies
931 Views

Similar Articles

[PageSpeed] 34
Get it on Google Play
Get it on Apple App Store

To import data from Excel you can use OLE automation to create an Excel
process in the background.

OLEObject  ole_object

myoleobject = CREATE OLEObject
ole_object = CREATE OLEObject

 If ole_object.ConnectToNewObject('Excel.application') <> 0 Then
      Messagebox('Rate Transfer','Could not connect to Excel~n~r Error code
'+String(li_rc) )
      Return -1
end if

open the workbook
ole_object.workbooks.Open(is_pathname)    <--- contains path and excel
filename to open

//Set active the worksheet
ole_object.WorkSheets("Input").Activate

//get values
la_anyval = ole_object.Application.ActiveSheet.Cells(li_row,li_col).Value

//close
ole_object.ActiveWorkBook.Saved = TRUE

ole_object.application.quit()

if ole_object.DisconnectObject() < 0 then
 Return -1
end if

<nicolas_S> wrote in message
news:DD0A38DCB75452990051FE2285256D2F.0051FE3285256D2F@webforums...
> I want to input data from an Excel in a datawindow.
> How can I do ?


0
FWPeters
5/23/2003 5:45:56 PM
Reply:

Similar Artilces:

Saving Excel Format when Copying Data from a Datawindow...
I am tasked with adding functionality to automate the maintenance of a formatted Excel Spreadsheet. Data will be updated in a PowerBuilder window, and the user wants a formatted Excel Spreadsheet to reflect the changes without losing or screwing up the formatting of the spreadsheet. The formatting consists of variable column headers (data dependent) and variations in the color of rows and columns. Anyone have a clue as to how this can be done? I'm stumped!!! It seems like there should be a way to do this. I REALLY appreciate any help!!! Thanks!!! Ted Jones Thanks Terry. ...

How to copy data from one excel file to other excel file
Hi I have two excel file (Ex1 and Ex2), both have same template (headers) and data will be populated from the dataset. Upto this step its works fine. My question : How to copy the data  form 6th row to last row of "Ex2" and paste it into the "Ex1" after the last row in Ex1.   Advance thanks Have a look here: For VB - http://support.microsoft.com/kb/306022 For C# - http://support.microsoft.com/kb/306023/ -Damien  Visoft, Inc - Home | Blogs Latest Blog Post: ASP.NET 4.0 AJAX Preview 4 - Client Templates...

data from datawindow to excel
Please help! I need to get data from a datawindow to pre-formated excel spreadsheets. Does anyone have a great solution to this problem? Should I use ole or dde or some other kind of coding solution? Sample code is much appreciated You must use ole. Look online books for sample - it's easy and work! Good luck, Gennady. Chris Edwards wrote: > Please help! > > I need to get data from a datawindow to pre-formated excel spreadsheets. > Does anyone have a great solution to this problem? > Should I use ole or dde or some other kind of coding solution? ...

Excel data into Datawindow
Is there a PB function to import an excel file into a datawindow or any OLE to do that? You could either save the Excel file as a CSV file and use the ImportFile ( ) method to bring the data in, or you could create an ODBC connection to the Excel file and use SQL to get the data. OLE methods area also available, but ends up being just a bit more code to maintain. Sanjiv. "A Chan" <AChan> wrote in message news:40e8a15b@forums-2-dub... > > Is there a PB function to import an excel file into a datawindow or any > OLE > to do that? > &...

Datawindow objects data copying
How can we copy data from one datawindow object of free form presentation style to another datawindow object that has more number of fields than latter ? To be more clear ------------------ 1. "dwo_one" has 10 fields. 2. "dwo_two" has 20 fields. I need to copy data from datawindow object "dwo_one" to "dwo_two". Does presentation style of the datawindow objects has any impact on the data copying ? On Tue, 14 Mar 2000 22:11:25 +0530, Veena Madhavi <bveenamadhavi@hotmail.com> wrote: >How can we copy data from one datawi...

to copy datawindow into excel as it is in the same layout
Please anybody can advice me to export the tree view datawindow as with same layout into excel.I tried with DW2Excel but it is not work with treeview datawindow. Any suggestion would be appreciate. With thanks Pol You can use OLE to create a real excel sheet, and add data, formatting the cells how you like. It's a lot of work, but you can puppet Excel to send it the commands. Use macros to discover the commands, then translate to PB. "Polachan" wrote in message news:4b2774b5.af5.1681692777@sybase.com... > Please anybody can advice me to export the tree view ...

Retrieve Data from Excel into a Datawindow
Hi, I have created an OLE object that opens an Excel worksheet, the user then adds data to the worksheet. I'm trying to pull data from a cell on the Excel worksheet, into a local variable in Powebuilder. It isn't pulling the information from Excel. Any suggestions? Thanks, Kris I've put an example on CodeXchange under PowerBuilder, ActiveX/OLE that demonstrates how to get data from Excel into PB. -- Terry Dykstra (TeamSybase) http://powerbuilder.codeXchange.sybase.com/ http://www.pb9books.com product enhancement requests: http://my.isug.com/cgi-bin/1/c/submit...

Copy Datawindow Data to a Structure
Hi, I have seen an example of copying data of a datawindow to a Structure, but I don't remember the syntax. CAn you help me? I have tried: structrue_x istr_x dw_1.object.data = istr_x The above works but dw_1 contains more than 1 row, so I tried structrue_x istr_x[ ] dw_1.object.data = istr_x Then I got a systemerro. Kathy Kathylo@bigfoot.com PB 5 16Bit Kathy Your subject gives the impression that you want to copy the data FROM the datawindow TO a structure. But your sample script does the other way round. Otherwise you are on the right track. That...

Copy blobcolumn data between datawindows
I need to copy the data in a blobcolumn to another blobcolumn in another datawindow (which contains another table with different columns - but it does have a blobcolumn). I do not find anything in the documentation about it. And the Sybase.DataWindow.GraphicObjectBlobColumn class unfortunately does NOT have an "ObjectData" property... Does anyone have an idea on how to do it (without having to first save the target row in the target datawindow to the database) ? Best regards Lars Sweden Well, GraphicObjectBlobColumn probably wouldn't...

Accessing Excel data from PowerBuilder
I am trying to access data in an Excel spreadsheet from PowerBuilder. After reviewing the PB documentation and a number of posts from these newsgroups, I figured that I can do it in one of three ways: 1. Save As text from the Excel file, then use a method like ImportFile to bring the data into PB; 2. Use OLE to access the Excel file; 3. Use ODBC to access the Excel file. (1) doesn't meet my requirements (I need to be able to bring in the data directly from Excel, without any intermediate steps), so that left me with options (2) and (3) (OLE or ODBC). I should say a bi...

Import Data From Excel to Datawindow
Hi there I'm using Powerbuilder Ver. 9 I want to import data from excel sheet to datawindow at run time by creating the datawindow depending on excel cells for the column name and data type Could any one help me how can i do it thanks alot With my best regards Ahmad Alhowaimel You can create an ODBC profile that uses your Excel spreadsheet as the "database". Once that is created, PowerBuilder sees it as just another database connection, and you can create datawindows using that datasource. Paul Horan[TeamSybase] <Ahmad Alhowaimel> wrote in message ...

importing excel data into a datawindow
I'm trying to import data from an excel file that contains 20 columns and about 25 rows. However, some of the columns contain alphabetic data that contains several lines of text. Therefore, when I save the file as a tab delimited text file it causes problems when importing to the datawindow. The datawindow thinks that the column data, which gets word-wrapped, is several different records when in fact it is only one. By the way I am using PB 5. Gerald PB looks for tabs and CRs. It shouldn't care about wrapping, which is just a visual feature of an editor anyway. On wr...

Copying Data between DW and CrosstabDW
i face this problem: I have a DW1 with external DataSource. This DW1 gets his Data from another DW2 based on some selections that the User can do. DW2 is based on a select. This works fine. So the Structure of DW1 and DW2 are equal. Now i want to copy (sharing is impossible) the Data of DW1 - the local DW - with a crosstab DW based on the same select than DW2. Is this possible ? How can i do this ? DB: Oracle 8.1.7. PB: 8.0.1 please help a newbie Joachim dw_1.Object.DataWindow.Data = dw_2.Object.DataWindow.Data ...

Copy data from Dynamic datawindow
I have a datawindow displaying data based on dynamic SQL's entered by users based on this code: new_syntax = sqlca0.SyntaxFromSQL(new_sql, & 'Style(Type=Grid)', error_syntaxfromSQL) ...... dw_bottom.Create(new_syntax, error_create) However, when the data displayed in the datawindow, I can not copy and paste the data into, say notepad, etc... How can I change that to be able to highlight bunch of rows and columns and then copy them? Thanks for any help. if you want to copy a selection of data, you'll need to compose it into a string (eg. tab-...

Web resources about - copy data Excel in Dw - sybase.powerbuilder.datawindow

List of Excel Saga characters - Wikipedia, the free encyclopedia
) was initially the sole officer of ACROSS. Excel approaches her work with an excess of determination and enthusiasm, but a lack of foresight ...

Microsoft Excel - Wikipedia, the free encyclopedia
Microsoft Excel is a commercial spreadsheet application written and distributed by Microsoft for Microsoft Windows and Mac OS X . It features ...

Facebook Excels At Going Green
Facebook’s trademark color may be blue , but it’s also known for being green. New figures released Wednesday by the social network show that ...

Jason Excel (@Anamewithaguy) on Twitter
Log in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Jason Excel @ Anamewithaguy ...

Microsoft Excel Users
This group is for those who use Microsoft Excel in their professional and/or personal use.

Contacts to Excel Lite on the App Store on iTunes
Get Contacts to Excel Lite on the App Store. See screenshots and ratings, and read customer reviews.

Carol review: Cate Blanchett and Rooney Mara excel as love story veers towards obsession
Describing Carol as a romance seems wrong: this goes much deeper, close to obsession, and not just in the lesbian part.

Leading CMOs Will Excel at Customer Obsession in 2016
2016 will be a consequential year in the race to win in the age of the customer. The market now moves at a speed not seen before driven by customers' ...

Word, Excel, and PowerPoint for iOS gain more new features
Microsoft has released new versions for the three core apps in its iPad and iPhone Office suite. Word for iOS 1.14 , Excel for iOS 1.14 , and ...

Master Excel and get certified for $19
Working in Excel can sometimes feel like trying to learn a foreign language. But with the right training, it can actually help you work faster ...

Resources last updated: 1/19/2016 10:19:02 PM