creating .csv file with numeric value
Walter Vaughan
wvaughan at steelerubber.com
Fri Oct 22 12:39:15 PDT 2004
Dennis Malen wrote:
> My problem is as follows:
>
> I created an export file which is a comma delimited and the processing then
> adds the extension .csv
>
> This is created on a unix box and then ftp'd to windows.
> PROBLEM
>
> One of the columns is a social security number. Some of the numbers have a
> leading zero (0) before it was loaded. Because all of the columns in Excel
> are defined as "general" as opposed to "text", the leading zero(0) is
> deleted when it is loaded.
>
> Does anyone know how to solve this problem without having to manually import
> the file into excel and manually change the definition of the file from
> "general" to "text".
Export data as HTML. Use styles to define field as "Text" or "General"
Your friend in all this is style='mso-number-format:"\@"' to define text
<html>
<head>
<body>
<table>
<tr>
<td style='mso-number-format:"\@"'>012-123-1234</td>
<td style='mso-number-format:General'>123</td>
</tr>
<tr>
<td style='mso-number-format:"\@"'>012-123-4567</td>
<td style='mso-number-format:General'>04670</td>
</tr>
</table>
</body>
</html>
Creating the export can be done via many methods...
Don't get hung up on newlines. You can have one header line, unlimited
data lines and one footer line.
I'll leave it to someone more well versed in filePro HTML codes to
translate the above into fP.
--
Walter
--
Walter
More information about the Filepro-list
mailing list