> >***************** and here is all the data rows ************************************************************************************** >Scan > lcRows = m.lcRows + "<Row>" lcData = "" > For lnField = 1 To Fcount() > luValue = Evaluate(Field(m.lnField)) > Do Case > Case Inlist(type(Field(m.lnField)),"C","Q","V") >*!* STRCONV(,9) = STRCONV(,9) - 1 the 9 Converts double-byte characters in cExpression to UTF-8 > lcString = Strconv(Alltrim(m.luValue),9) && let's remove any illegal characters that will confuse the simple XML -- like "<>" > lcString =STRTRAN(lcString,"<","") > lcString =STRTRAN(lcString,">","") lcData = m.lcData + ; > [<Cell ss:StyleID="s23">]+[<Data ss:Type="String">]+lcString+[</Data>]+[</Cell>] > Case Inlist(type(Field(m.lnField)),"M") lcData = m.lcData + ; > [<Cell ss:StyleID="s22">]+[<Data ss:Type="String">]+Strconv(Alltrim(m.luValue),9)+[</Data>]+[</Cell>] > Case Inlist(Vartype(m.luValue),"L") lcData = m.lcData + ; > [<Cell ss:StyleID="s23">]+[<Data ss:Type="String">]+IIF(Transform(m.luValue)==".T.","TRUE","FALSE")+[</Data>]+[</Cell>] > Case Inlist(Vartype(m.luValue),"N","B","F","I") ***** as m.luValue can never be NULL due to Vartype() check, NVL() makes no sense and if NULL occurs in this column, ***** LOOP in Otherwise will IMHO make problems as the No. of columns is wrong ***** Case Inlist(laFieldtypeData[m.lnField],"N","B","F","I") && if created before scan starts... lcData = m.lcData + ; > [<Cell ss:StyleID="s23">]+[<Data ss:Type="Number">]+Transform(Nvl(m.luValue,0))+[</Data>]+[</Cell>] > Case Inlist(Vartype(m.luValue),"Y") lcData = m.lcData + ; > [<Cell ss:StyleID="s23">]+[<Data ss:Type="String">]+Transform(Nvl(m.luValue,0))+[</Data>]+[</Cell>] > Case Inlist(Vartype(m.luValue),"D","T") lcData = m.lcData + ; > [<Cell ss:StyleID="s23">]+[<Data ss:Type="String">]+Transform(Nvl(m.luValue,""))+[</Data>]+[</Cell>] > Otherwise > LOOP && skipping blobs and generals > ENDCASE ****** lcRows = m.lcRows +m.lcData && takes too long if recno>100K! > Endfor lcRows = m.lcRows + m.lcData + "</Row>" >ENDSCAN > >***************** /Data Rows ************************************************************************************** >