Excel - CSV File format problem

Asked By plmanikanda
14-Feb-07 12:16 PM
Hi,
I have a .csv file with following data

No,Name
0001,ii
0002,ww

I need to change the csv file in excel and insert into a database thru
my c# programs.
The "No" column is rounded off when i opened in excel and it is shown
as 1.
Is there any settings to change this type of behaviour
I want to display that "No" column as text in excel by default.
I don't want the trimming of zero in the "No" column

Thanks & Regards,
Mani
Excel
(1)
Name
(1)
Database
(1)
  Beege replied...
14-Feb-07 12:21 PM
Rename your .csv to .txt, import into excel, format No column as
text... HTH

Beege
  Thomas Hardy replied...
14-Feb-07 01:48 PM
Spot on Beege,

It is a weakness in Excel that it makes assumptions about your data, even in
some cases when you clearly define a cell as text.

I always download data from other systems with the .txt extension so that I
can keep some level of control.

Regards

Thomas
Create New Account
help
Win7 VirtualStore Weirdness with Excel 2002 and earlier Excel I thought I'd share a weird experience I had today in case it saves installer for it - - which registers it as an add-in for all installed versions of Excel - - and tested it. Fine in Windows 2000 in all installed versions of Excel. Boot to Windows XP, fine there too. Boot to Windows 7. Fine in Excel 2010, 2007, and 2003. But Excel 2002 and 2000 were still loading the old version of the add-in. I uninstalled the add-in, made sure it was gone, and reinstalled it. Same problem in Excel 2002 and earlier; still works fine in Excel 2003 and later. I opened the VB editor in Excel 2003 and in Excel 2002
Propriété_NameLocal Excel J'essaye de cr?er un nom localis? avec la propri?t? NameLocal mais ?a ne fonctionne pas. Si je fais pas exemple: Names.Add Name: = "Period", NameLocal: = "P?riode", RefersTo: = " = Test!$C:$C" Mais NameLocal a alors la m?me valeur que Name, qui est "Period". Merci Excel - French Discussions Selection.Paragraphs.Style.NameLocal (1) Visual Studio (1) ActiveSheet.UsedRange (1) Excel 2007 (1) Office (1) Word (1) Application.CommandBars (1) ActiveWorkbook.Styles (1) Bonjour. D'apr?s l'aide, tu dois sp?cifier "Name" ou "Namelocal", pas les deux. Cordialement. Daniel L'aide dit que l'un est optionnel all?grement les deux dans ton explication. . . Alain bonjour Alain, les arguments sont : expression.Add(Name, RefersTo, Visible, MacroType, ShortcutKey, Category, NameLocal, RefersToLocal, CategoryLocal, RefersToR1C1, RefersToR1C1Local) il suffie de sp?cifier Affichais: Period Alain Bonjour, Un contournement possible (je ne fais pas mieux que toi avec Name et NameLocal) : Sub essai() Names.Add Name: = "Period", RefersTo: = " = Test!$C:$C" Names.Add Name
Contatore Excel Ciao, sto cercando di fare in modo che all'apertura di un file venga scritta che contenga le date di apertura. Qualcuno ha uno script gi = E0 fatto? tks Sandro Excel - Italian Discussions ThisWorkbook.Worksheets Foglio1 With sh (1) Nothing End Sub Modifica Foglio1 (1) Worksheets (1) Excel 2010 (1) Excel 2007 (1) Macro (1) Date (1) VBA (1) = 3D = 3D = 3D = 3D = 3D = 3D = 3D le cose *fatte bene*. Questo nel modulo di codice di ThisWorkbook (o Questa_Cartella_Di_Lavoro se utilizzi Excel 2010): Private Sub Workbook_Open() Dim sh As Worksheet Set sh = ThisWorkbook.Worksheets("Foglio1") With sh il nome del foglio, no? Altrimenti, 'ndo cojo cojo(che i romani mi scusino). Ed Excel 2007 e 2010 hanno oltre un milione di righe, non 65536. - -- -- -- -- -- -- -- -- -- -- -- -- -- Mauro Gamberini Microsoft MVP - Excel http: / / www.riolab.org / http: / / www.maurogsc.eu / On 21 Dic, 14:13, "Mauro Gamberini le cose *fatte bene*. Questo nel modulo di codice di ThisWorkbook (o Questa_Cartella_Di_Lavoro se utilizzi Excel 2010): Private Sub Workbook_Open() Dim sh As Worksheet Set sh = 3D ThisWorkbook.Worksheets("Foglio1") With
Togliere i primi 4 caratteri di tutti i file residenti in una cartella Excel Ho una cartella contenente pi? di 2000 file musicali. Vorrei che dal nome di ciascuno di essi venissero eliminati i primi 4 caratteri. E' possibile? e se si come? Grazie Excel - Italian Discussions Scripting.FileSystemObject (1) ObjFSO.GetExtensionName (1) Excel (1) Word (1) ObjFSO.FileExists (1) ObjFSO.GetFolder (1) ObjFSO.BuildPath (1) DicErr.Exists (1) me di se in excel ? o in vb.net (facile, facilissimo. . .) ? e su che s.o. ? S?. Se sono tutti In objFolder.Files With objFile 'elimino i primi 4 caratteri objFile.Move (sPath & Mid(objFile.Name, 5, Len(objFile.Name))) End With Next 'Set a Nothing delle variabili oggetto Set objFile = Nothing Set objFolder = Nothing org / http: / / www.maurogsc.eu / http: / / social.microsoft.com / Forums / it-IT / officeit / threads in excel ? o in vb.net (facile, facilissimo. . .) ? e su che s.o. ? * ** ** ** ** ** ** ** ** ** ** ** * Qui .net non c Forums / it-IT / officeit / threads On 14 Dic, 14:59, "Mauro Gamberini" nome le? jFile.Name))) .microsoft.com / Forums / it-IT / officeit / threads ciao Mauro, credo che convenga anche controllare se
VBA: tempi eliminazione righe Excel Ciao a tutti, mi chiedevo se esiste un metodo pi = F9 rapido per agire su fogli Excel di grandi dimensioni (pi = F9 di 100.000 record) rispetto a . . . Application.ScreenUpdating = 3D False 3D "xxx" Then Rows(i).Delete End If Next Application.ScreenUpdating = 3D True Grazie mille Excel - Italian Discussions PivotField (1) AutoFilter (1) PivotTable (1) PivotCache (1) Application.ScreenUpdating (1) Excel 2010 (1) Worksheets (1) Error (1) Ciao Devi assolutamente evitare la lettura / scrittura diretta sul 1 -1 prova cos = EC: Sub delete_rows() Dim i As Long, d Dim rng As Excel.Range d = 3D Timer For i = 3D Range("A1").CurrentRegion.Rows.Count To 1 Step Occhio con le date, le passi come stringhe e vanno gestite. - - - -- -- -- -- -- -- -- -- -- -- -- -- -- Mauro Gamberini Microsoft MVP - Excel http: / / www.riolab.org / http: / / www.maurogsc.eu / Filtri il campo B per celle diverse da xxx - - - -- -- -- -- -- -- -- -- -- -- -- -- -- Mauro Gamberini Microsoft MVP - Excel http: / / www.riolab.org / http: / / www.maurogsc.eu / Conosco i vantaggi e i limiti del i dati gi = E0 non sono ordinati per altra key) saluti r r pretended : In Excel 2010 d? errore 91, *Object variable or With block variable not set", su rng.Delete