Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Sugar House
  Where is Sugar House?
 Makati
 Philippines
 Sugar House
 Tags
Subject: RE: Importing from xlsx - part 2
Thread ID: 327800 Message ID: 331324 # Views: 39 # Ratings: 1
Version: Visual FoxPro 9 Category: Microsoft Office Automation
Date: Wednesday, December 28, 2011 11:31:30 PM         
   


> > Remember the automation approach I have shown inside Weblogs last time?
> >
> > Due to new questions raised here inside the forum, I decided to create a Part II of said approach for interested members (and non-members). This involves the same trick I have shown before but this now has these two new capabilities:
> >
> > 1. Allows you to select which sheet will be imported. In the old post I have shown, it only imports Sheet1 contents
> >
> > 2. Changes field names with proper names coming from row 1 of excel instead of A, B, C..... and so on.
> >
> > If you are curious or interested, read this: http://sandstorm36.blogspot.com/2011/11/importing-from-xlsx-file-via-automation.html
> >
> >
> > http://sandstorm36.blogspot.com/view/magazine
> > http://weblogs.foxite.com/sandstorm36/default.aspx
>
>
> Hi again Jun,
>
> Correct me if I'm wrong, It also create a dbf file right? And I'm wondering how this dbf file named? Because I wish to rename it on my code.
>
> Thanks.


The name is dependent on the variable lcTemp where, being a temp file, I normally use sys(3) for the random names. So if you want to control the filename of the dbf, just change this:

lcTemp = Addbs(Getenv("TEMP"))+Sys(3)+".xls"


Into this:

lcTemp = PUTFILE()  


That is the 4th line (row) on the code snippets I showed there.

http://sandstorm36.blogspot.com
http://weblogs.foxite.com/sandstorm36/default.aspx

ENTIRE THREAD

Importing from xlsx - part 2 Posted by Jun Tangunan @ 11/22/2011 3:57:06 AM
RE: Importing from xlsx - part 2 Posted by Sugar House @ 11/24/2011 10:47:21 AM
RE: Importing from xlsx - part 2 Posted by Jun Tangunan @ 11/24/2011 10:54:06 PM
RE: Importing from xlsx - part 2 Posted by Sugar House @ 11/25/2011 12:20:55 PM
RE: Importing from xlsx - part 2 Posted by Sugar House @ 12/28/2011 12:42:21 PM
RE: Importing from xlsx - part 2 Posted by Jun Tangunan @ 12/28/2011 11:31:30 PM
RE: Importing from xlsx - part 2 Posted by Sugar House @ 12/29/2011 2:35:04 AM
RE: Importing from xlsx - part 2 Posted by Jun Tangunan @ 12/29/2011 2:44:21 AM
RE: Importing from xlsx - part 2 Posted by Sugar House @ 12/29/2011 2:50:17 AM