<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>[WD14]  Problem in Excel read in</title>
        <description> Hello All

We have a facility to read in data from an Excel spreadsheet.  The sheet is tightly formatted and the heading in each column in row 1 is used to drive the read in methods.
We have just found that if a column heading consists of numbers Windev ignores the column entirely.   We can fix it with a prefix but I am curious if anyone else has observed this.

A column heading of &amp;quot;123&amp;quot; is ignored but &amp;quot;A123&amp;quot; is ok


//get the number of columns, ignore empty columns
LColNum = xlsNbColumn (XLSFileID, True)
//column headings are ColA,123,ColC
//this count is always correct, so it is seeing the column headed &amp;quot;123&amp;quot;
//and at this point LColNum = 3 which is correct

FOR LColcounter = 1 TO LColNum
  //this loop reads the columns from 1 to the last column
  LDatares = xlsData(XLSFileID, XLSRecRead, LColcounter, False )
  LColHeader= xlsColumnTitle (XLSFileID, LColcounter, True )
  SWITCH NoSpace(Upper(LColHeader))
  //case statements
  End
  LColCOunter ++
End //FOR LColcounter = 1 TO LColNum

//When LColCounter = 1  LColHeader = &amp;quot;ColA&amp;quot;
//When LColCOunter = 2 it ignores the second column &amp;quot;123&amp;quot; and the code LColHeader= xlsColumnTitle (XLSFileID, LColcounter, True )  returns the third column &amp;quot;ColA&amp;quot; as the second column title.

The xlsNbColumn() always returns the correct number of columns regardless of their heading but the other commands ignore columns with number headings
If I change the second column heading to &amp;quot;A123&amp;quot; everything is fine

I think its a bug but maybe I am doing something wrong ?

Regards
Al </description>
        <link>https://www.wxforum.info/read.php?27593,91954,91954#msg-91954</link>
        <lastBuildDate>Wed, 11 Nov 2026 13:21:05 +0100</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://www.wxforum.info/read.php?27593,91954,92370#msg-92370</guid>
            <title>Re: [WD14]  Problem in Excel read in</title>
            <link>https://www.wxforum.info/read.php?27593,91954,92370#msg-92370</link>
            <description><![CDATA[ Hello All<br />
<br />
I had a response from Tech support advising that Windev assumes that columns with a numeric heading are assumed to be numbers and to use a prefix as a workaround.<br />
<br />
This was my response to tech support.<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />
I would suggest that this is a bug and that Windev&#039;s assumption is wrong.  <br />
Windev should not make that assumption regarding the data on my behalf.<br />
If I explicitly ask Windev to get me the title using xlsColumnTitle () on that cell then at the very least it should return the contents of the cell as a string so I could test it for being numeric.  <br />
There is an additional problem because there is a conflict with the xlsNbColumn() command which correctly returns the number of non blank columns so it is counting the columns correctly even though one of them has a numeric header.<br />
  <br />
So the situation is that one Windev command tells me I have x number of columns and another Windev command ignores one or more of those coulmns.   Surely that needs attention rather than me using a permanent workaround ?     I don&#039;t always have control over the column headings in data I receive from clients.<br />
<br />
Perhaps what is required is a method of nominating a row as a header row for the express purpose of retrieving column headings.   Would you lodge that as a suggestion please.<br />
<br />
Would you also lodge a second suggestion to change xlsColumnTitle () so that it returns either the cell content as a string or an error indicating that it does not regard that column as valid.</div></blockquote>
<br />
<br />
Are there any other suggestions as to how this problem could be be fixed ?<br />
For the moment the only solution is to add a prefix to columns headings that only have numbers.<br />
<br />
Regards<br />
Al<br />
]]></description>
            <dc:creator>Al</dc:creator>
            <category>WX-Products: Reports of malfunctions &amp; bugs</category>
            <pubDate>Mon, 07 Feb 2011 21:42:10 +0100</pubDate>
        </item>
        <item>
            <guid>https://www.wxforum.info/read.php?27593,91954,91954#msg-91954</guid>
            <title>[WD14]  Problem in Excel read in</title>
            <link>https://www.wxforum.info/read.php?27593,91954,91954#msg-91954</link>
            <description><![CDATA[ Hello All<br />
<br />
We have a facility to read in data from an Excel spreadsheet.  The sheet is tightly formatted and the heading in each column in row 1 is used to drive the read in methods.<br />
We have just found that if a column heading consists of numbers Windev ignores the column entirely.   We can fix it with a prefix but I am curious if anyone else has observed this.<br />
<br />
A column heading of &quot;123&quot; is ignored but &quot;A123&quot; is ok<br />
<br />
<pre class="bbcode">
//get the number of columns, ignore empty columns
LColNum = xlsNbColumn (XLSFileID, True)
//column headings are ColA,123,ColC
//this count is always correct, so it is seeing the column headed &quot;123&quot;
//and at this point LColNum = 3 which is correct

FOR LColcounter = 1 TO LColNum
  //this loop reads the columns from 1 to the last column
  LDatares = xlsData(XLSFileID, XLSRecRead, LColcounter, False )
  LColHeader= xlsColumnTitle (XLSFileID, LColcounter, True )
  SWITCH NoSpace(Upper(LColHeader))
  //case statements
  End
  LColCOunter ++
End //FOR LColcounter = 1 TO LColNum

//When LColCounter = 1  LColHeader = &quot;ColA&quot;
//When LColCOunter = 2 it ignores the second column &quot;123&quot; and the code LColHeader= xlsColumnTitle (XLSFileID, LColcounter, True )  returns the third column &quot;ColA&quot; as the second column title.

The xlsNbColumn() always returns the correct number of columns regardless of their heading but the other commands ignore columns with number headings
If I change the second column heading to &quot;A123&quot; everything is fine</pre>
<br />
I think its a bug but maybe I am doing something wrong ?<br />
<br />
Regards<br />
Al ]]></description>
            <dc:creator>Al</dc:creator>
            <category>WX-Products: Reports of malfunctions &amp; bugs</category>
            <pubDate>Wed, 02 Feb 2011 02:59:26 +0100</pubDate>
        </item>
    </channel>
</rss>
