Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transform a txt file to xml
Message
From
26/09/2006 05:02:52
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01157163
Message ID:
01157179
Views:
25
This message has been marked as a message which has helped to the initial question of the thread.
create cursor curdummy;
  (cSdNummer c(7), cnosecretariat c(7), cType c(5), ddate d, cSdCode c(4), TotHo c(4))
*you may have to change the structure of this cursor!
append from yourtextfile SDF
CursorToXML('curdummy','yourxmlfile.xml',1,512)
>it is two different program.
>
>program1 make *.txt file
>program2 make *.xml file from exportsd.txt
>
>bernhart
>
>>Why not simply use cursortoxml?
>>SELECT cursorfinal
>>CursorToXML('cursorfinal','yourxmlfile.xml',1,512)
>>
>>
>>>Hello tore,
>>>
>>>
>>>SELECT  PADL( ALLTRIM( Tempx.cnosecretariat) ,7 , "0" ) AS 'cnosecretariat',;
>>>  TRANSFORM( Tempx.iemployeid , "@L 9999999" ) AS 'iemployeid',;
>>>  Tempx.ddate,;
>>>  Tempx.iplanpauseid,;
>>>  SurSalaire,;
>>>  PADL( TRANSFORM( INT( SUM( totheure ) * 100 )), 4  , "0" ) AS 'TotHo' ,;
>>>  MAX( Planpause.cnom ) AS 'cnomPlanpause',;
>>>  MAX( PADL( Planpause.cnomsecsocial , 4 , "0" ) ) AS 'cnomsecsocial',;
>>>  SPACE(4) AS cSdCode ,;
>>>  MAX( IIF( ISNULL( D.djour ) , .F. , .T. )) AS 'jf',;
>>>  MAX( Planpause.lnuit ) AS 'lnuit',;
>>>  MAX( 'K' ) AS 'cType',;
>>>  PADL( ALLTRIM( ls_numdossier ) ,7 , "0" ) AS 'cSdNummer';
>>>  FROM Tempx ;
>>>  INNER JOIN Planpause	ON  Tempx.iplanpauseid = Planpause.iid ;
>>>  INNER JOIN Securit ON  Securit.itelephoneid = Tempx.itelephoneid ;
>>>  LEFT JOIN DatesFiltred D ON D.djour = Tempx.ddate ;
>>>  GROUP BY 1,2,3,4,5 READWRITE INTO CURSOR CursorFinal
>>>
>>>SELECT cursorfinal
>>>
>>>*-- Transforme éventuellement un code de centralisation
>>>*-- en fonction d'un sursalaire. Ex : 0010 devient 0011 le samedi.
>>>UPDATE cursorfinal SET cSdCode = THIS.cSdCodeFind()
>>>
>>>SET SAFETY OFF
>>>
>>>clocToExport = "c:\"
>>>cNameToExport = "ExportSd.txt"
>>>THIS.cNameToExport = clocToExport  + cNameToExport
>>>*-- 08/2006 Le nom du fichier est à modifier ?
>>>COPY TO ( THIS.cNameToExport )  TYPE SDF FIELDS ;
>>>  cSdNummer,;
>>>  cnosecretariat ,;
>>>  cType,;
>>>  ddate,;
>>>  cSdCode,;
>>>  TotHo
>>>
>>>
>>>
>>>This file is on http://www.Amline.be/Ng/ExportSd.txt
>>>
>>>
>>>>>Hi all,
>>>>>
>>>>>i want to transform a txt file to xlm file.
>>>>>is ' t possible ?
>>>>>I search a sample...( with xlmadapter if possible ...)
>>>>>
>>>>>Thankin advance for the answer...
>>>>>
>>>>>bernhart
>>>>
>>>>What is the contents of the txt like, is it plain text or some sort of tables?
Previous
Reply
Map
View

Click here to load this message in the networking platform