Import from Excel

Can you please tell us what is best way to import data from Microsoft Excel.
    1. Using ODBC driver
    2. Through DDE Communication with Excel
    3. Save Excel sheet as tab delimited data and import into datawindow.

Thanks in advance.
RAJ



0
PUNNIARAJ
3/4/2002 5:57:13 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

4 Replies
657 Views

Similar Articles

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

It depends.
1) Requires that you have a Named Range in Excel, with the first row used
for Column headers.  Works well, unless you have columns that have a mix of
alpha and numeric values.  Even if ODBC thinks the column is a char, it will
skip the rows with a numeic value in that column.
2)  OLE is more robust than DDE and gives you the ultimate flexibility.  The
spreadsheet data can be in any format.
3)  Works great.  Combine with OLE to automate the Excel part to save to
tab-delimited.

--
Terry Dykstra (TeamSybase)
Please state PB / OS / DB versions in your post.
MySybase http://my.sybase.com/mysybase
Search Deja: http://www.pfcguide.com/_newsgroups/search.asp

"PUNNIARAJ T" <rajtp@hotmail.com> wrote in message
news:EhGo4Y6wBHA.206@forums.sybase.com...
> Can you please tell us what is best way to import data from Microsoft
Excel.
>     1. Using ODBC driver
>     2. Through DDE Communication with Excel
>     3. Save Excel sheet as tab delimited data and import into datawindow.
>
> Thanks in advance.
> RAJ
>
>
>


0
Terry
3/4/2002 5:59:19 PM
I agree with Terry that OLE is the way to go.  Search www.google.com for
"Powerbuilder excel ole" for numerous discussions on how to accomplish this.

HTH

-EGM


PUNNIARAJ T <rajtp@hotmail.com> wrote in message
news:EhGo4Y6wBHA.206@forums.sybase.com...
> Can you please tell us what is best way to import data from Microsoft
Excel.
>     1. Using ODBC driver
>     2. Through DDE Communication with Excel
>     3. Save Excel sheet as tab delimited data and import into datawindow.
>
> Thanks in advance.
> RAJ
>
>
>


0
Edward
3/4/2002 6:00:48 PM
I would use Automation.

For example:
OleObject ExcelApp
OleObject ExcelWorkSheet
String MyVar

ExcelApp = Create OleObject
ExcelApp.ConnectToNewObject("Excel.Application")
ExcelApp.Workbooks.Open("YourSpreadsheet.Xls")
ExcelWorksheet = ExcelApp.ActiveSheet.Cells

MyVar = ExcelWorkSheet.Cells(1,1).Value

You could simply setup a loop and retrive values (could be number, dates,
etc) as needed.  You will need to spend some time looking at the Excel VBA
Documentation.


Good Luck
Frank



"PUNNIARAJ T" <rajtp@hotmail.com> wrote in message
news:EhGo4Y6wBHA.206@forums.sybase.com...
> Can you please tell us what is best way to import data from Microsoft
Excel.
>     1. Using ODBC driver
>     2. Through DDE Communication with Excel
>     3. Save Excel sheet as tab delimited data and import into datawindow.
>
> Thanks in advance.
> RAJ
>
>
>


0
Frank
3/4/2002 6:01:36 PM
Thanks Terry
-Raj

"Terry Dykstra" <dontreply_tddykstra@forestoil.ca> wrote in message
news:G1sPDd6wBHA.304@forums.sybase.com...
> It depends.
> 1) Requires that you have a Named Range in Excel, with the first row used
> for Column headers.  Works well, unless you have columns that have a mix
of
> alpha and numeric values.  Even if ODBC thinks the column is a char, it
will
> skip the rows with a numeic value in that column.
> 2)  OLE is more robust than DDE and gives you the ultimate flexibility.
The
> spreadsheet data can be in any format.
> 3)  Works great.  Combine with OLE to automate the Excel part to save to
> tab-delimited.
>
> --
> Terry Dykstra (TeamSybase)
> Please state PB / OS / DB versions in your post.
> MySybase http://my.sybase.com/mysybase
> Search Deja: http://www.pfcguide.com/_newsgroups/search.asp
>
> "PUNNIARAJ T" <rajtp@hotmail.com> wrote in message
> news:EhGo4Y6wBHA.206@forums.sybase.com...
> > Can you please tell us what is best way to import data from Microsoft
> Excel.
> >     1. Using ODBC driver
> >     2. Through DDE Communication with Excel
> >     3. Save Excel sheet as tab delimited data and import into
datawindow.
> >
> > Thanks in advance.
> > RAJ
> >
> >
> >
>
>


0
PUNNIARAJ
3/4/2002 6:08:29 PM
Reply:

Web resources about - Import from Excel - sybase.powerbuilder.general

Gaza imports - Wikipedia, the free encyclopedia
Import of goods into the Gaza Strip is limited as part of the 2007–present blockade of the Gaza Strip imposed by Israel and Egypt . Israel allows ...

Instagram 4.1 Adds Ability To Import Video, Automatic Straightening
Facebook-owned photo-sharing network Instagram released Instagram 4.1 last week, which added the ability for users to import video from their ...

Oakland Opens the Wallet for Cuban Import
Looks like Billy Beane really is sticking to that Window. After spending the offseason trading away two of the better young starting pitchers ...

Import and Publish YouTube Videos to Your Facebook Page with Cueler YouTube
Cueler is a useful and easy Facebook application that allows Page administrators to automatically synchronize their YouTube videos to their Facebook ...

Export Import Business Group
Here we are, people in the business of export and import from all over the world. I invite you people also to join for more info of the business ...

ExcelContacts Lite - Export/Import contacts to/from Excel on the App Store on iTunes
Get ExcelContacts Lite - Export/Import contacts to/from Excel on the App Store. See screenshots and ratings, and read customer reviews.

Secretary Kerry Delivers Remarks at the Export-Import Bank Annual Conference - Flickr - Photo Sharing ...
U.S. Secretary of State John Kerry delivers remarks at the Export-Import Bank Annual Conference in Washington, D.C., on April 24, 2014. [State ...

Christmases come at once for Canberra Cavalry imports at Percy households
When a Canberra Cavalry player is billeted by ground announcer Matt Percy and his family, the unofficial initiation is usually a big spoonful ...

Apple adds iPhones to Lightning to USB Camera Adapter compatibility list, photo import works under iOS ...
... reading at 9to5Mac . What do you think? Discuss "Apple adds iPhones to Lightning to USB Camera Adapter compatibility list, photo import works ...

Import brands dominate list of finalists for North American Car and Truck of the Year
Coverage of advertising spending, campaigns and agency changes in the automotive industry.

Resources last updated: 1/6/2016 9:08:05 AM