Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid to Clipboard
Message
De
08/07/2003 12:03:36
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00806113
Message ID:
00808048
Vues:
31
>Hallo Cetin,
>
>thanks for your help. Unfortunately I think, "set fields" is too strong: in my case I have a timer that fires every 500 ms and checks for some values in certain fields. Now as soon as I "Set Fields To" these fields are not more available for the timer and it "cries".
>
>I can also imagine some other circumstances (refreshes in background forms and so on) that will prevent the "Set Fields To" - idea from being a universal method. Another problem by this approach is that the active workzone is not always involved in the grid - in this case I get an empty fieldlist.
>
>What I actually want is to make a 1:1 copy of any given grid in Excel. In the best case it must be a method of my grid-class. I thought it could be probably easier to first copy the entire grid to clipboard or something like that.
>
>Has really noone wanted it already?

No one wanted :)
On the long run you can't have a 1:1 copy of a grid in anyways in Excel. Excel is not capable of doing that (not yet at least).
set fields to still would work for what you want. ie :
Set Fields global
Use customer
Use orders In 0 order tag cust_id
Use orditems In 0 Order tag order_id
Set relation to cust_id into orders
Set relation to order_id into orditems in 'Orders'
Set Fields to cust_id, company, orders.order_id, ;
  orders.order_date, orditems.line_no,;
  orditems.product_id,orditems.quantity,;
  orditems.unit_price,;
  Price=orditems.quantity * orditems.unit_price
Set Skip to orders, orditems
*Browse
Copy To myCheck.txt type csv
*Copy To myCheck.txt type delimited with "" with tab
_cliptext = FileToStr('myCheck.txt')
You could loop and use controlsources (if you need you could create and do that in a private session too).
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
Répondre
Fil
Voir

Click here to load this message in the networking platform