Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two problems with DBF to Excel function
Message
De
13/01/2009 12:46:40
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01373048
Message ID:
01373290
Vues:
28
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I'm wondering if someone can help me solve two problems. I have this routine Re: Excel Automation Formatting and F9 Thread #1372023 Message #1372036 to produce an Excel from the opened table. I have two problems.
>
>1. If I pass two lines title ('Line1' + CRLF + 'Line2') I only see Line1. I think it's related with my latest modification of the routine to center the title (I use merge columns). I'm not sure how to quickly fix this problem to have both lines centered properly.
>
>2. In Office 2007 there is a prompt to save the file even though I use SaveAs and DisplayAlerts = .f. Is there a way to avoid any dialogs in any version of the office?
>
>Thanks a lot in advance for your help.

Hi Naomi,

1) You are merging cells but still trying to write title lines into different rows (for .. cells(m.lnK) = laTitle[..]). Simply write the title to cells(1,1) . ie:
.Cells(1,1) = m.tcTitle && you may need to remove chrt(13).
2) I don't have 2007 here but this should work:
oExcel.ActiveWorkbook.Close(0)
oExcel.ActiveWorkbook.Saved = .t. && just thi sline should be enough
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform