LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default dropping prefix '0's when creating a spreadsheet in code

I'm developing a vb .net function that creates a .xls or .csv for a vb .net
dataset. The guts of the routine goes something like this:
objws.Cells(rowindex, colindex) = fixedstring

When I print fixedstring to the screen, it reads, for example, '00833', but
once I save it, it becomes 833 and Excel sees it as a number, not text.
I've tried every file format I can think of, but regardless how I save it, I
get the same result. Is there something I need to do to preserve prefix
'0's and the data type as string rather than numeric?

Thanks for any help.

Bernie Yaeger




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofill data based on an assigned code/prefix anrcreations Excel Worksheet Functions 2 February 11th 10 07:50 PM
zipcode phone # area code/prefix problem Sean Newman New Users to Excel 1 December 21st 06 07:41 PM
Macro code for dropping to next empty cell JB2010 Excel Discussion (Misc queries) 4 November 3rd 05 01:35 PM
spreadsheet dropping leading zeroes when exporting from SQL Serve. RPurgahn Excel Worksheet Functions 0 June 29th 05 02:08 PM


All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"