Advertisement

05.09.2008 at 09:51AM PDT, ID: 23390106
[x]
Attachment Details

Open Excel Files from Foxpro that reside in SharePoint

Asked by rickbull in FoxPro Database, MOSS-Sharepoint

Tags: Visual Foxpro 9.0

I am having a problem open excel files from Foxpro that have spaces in either the directory or filename, but my code works when the path does not have spaces.  I am not sure what changes I should make.

My previous method was starting excel with the RUN command, but some workstations have different versions so the path is different, so I am converting all my code to use OLE.

I have tried replacing "%20 with " " and it does not work either.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
mFile = '"http://intranet.cami.ca/sites/materials/NPD%20Materials/Buildout%20Metric%20-%20All%20Years.xls"'
 
*this code only works when the path does not have spaces
oleExcel = CREATEOBJECT("Excel.Application")
oleExcel.Workbooks.Open(mFILE)
oleSheet = oleExcel.Sheets(1)
oleExcel.Visible = -1
 
* this code works for paths without or with spaces
mI='c:\program files\microsoft office\office11\excel.exe '+mFILE
RUN/N &mI
[+][-]05.09.2008 at 10:07AM PDT, ID: 21534770

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.09.2008 at 10:09AM PDT, ID: 21534787

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.10.2008 at 02:02AM PDT, ID: 21538284

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: FoxPro Database, MOSS-Sharepoint
Tags: Visual Foxpro 9.0
Sign Up Now!
Solution Provided By: zlatev
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.12.2008 at 04:48AM PDT, ID: 21546024

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628