bonjour, j'ai un formulaire que je voudrais exporté sous excel, mais j'ai un souci avec certains type de données.

En effet, j'ai des identifiants qui sont des suites de chiffres (ex: code organisme: 12540572008), et lors de l'export excel me les affiches en format scientifique 1.25*10^9).

J'ai éssayé de convertir en string avec cstr() avant d'importer, mais rien n'y change, j'ai même éssayer de mettre des espaces au début et à la fin de mon code mais le problème perciste.

Voici le code utilisé pour l'export excel:
je rempli un tableau asp que j'exporte ensuite au format csv.
(les valeurs en pourpre sont les codes en questions)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

dim exportSaisine(11,16)
				
			'-------------------------------------------------------------------
			'entête
                                      exportSaisine(1,1)="FORMATION"		
			exportSaisine(2,1)="N° Référencement"
			exportSaisine(2,2)="N° Convention"
			exportSaisine(2,3)="Date début convention"
			exportSaisine(2,4)="Date fin convention"
			exportSaisine(2,5)="Date décision"
			exportSaisine(2,6)="Département principal mise en oeuvre convention"
			exportSaisine(2,7)="Formacode"
			exportSaisine(2,8)="Intitulé Formation"
			exportSaisine(2,9)="Code organisme"
			exportSaisine(2,10)="Intitulé organisme"
			exportSaisine(2,11)="Nb heures formation"
			exportSaisine(2,12)="Nb heures en entreprise"
			exportSaisine(2,13)="Nb heures en centre de formation"
			exportSaisine(2,14)="Nb stagiaires prévu"
			exportSaisine(2,15)="Porteur de projet"
			exportSaisine(2,16)="Info Complémentaire"
			
                                       ' valeurs
			exportSaisine(3,1)=numref 
			exportSaisine(3,2)=numconv 
			exportSaisine(3,3)=datedeb
			exportSaisine(3,4)=datefin
			exportSaisine(3,5)=dateDec
			exportSaisine(3,6)=dpt
			exportSaisine(3,7)=codform
			exportSaisine(3,8)=formationtab("LibelleFormation")
			exportSaisine(3,9)=codorg
			exportSaisine(3,10)=organismetab("LibelleOrganisme")
			exportSaisine(3,11)=nbht
			exportSaisine(3,12)=nbhe
			exportSaisine(3,13)=nbhf
			exportSaisine(3,14)=nbs
			exportSaisine(3,15)=port
			exportSaisine(3,16)=info
			
			'----------------------------------------------------------------------
		
		
		
			' export excel
			
			dim file, filename
			Sub EcrireXL(MyStr,byref Target)
				on error resume next
				Tmp=Mystr
				for i=1 to 30
					tmp=replace(tmp,chr(i)," ")
				next
				tmp=replace(tmp,";",",")
				Target=Target & chr(34)&tmp&chr(34)&";"
			end sub
			Sub Export
				Set FSO = Server.CreateObject("Scripting.FileSystemObject")
				dim dir : dir = Server.MapPath("export")
				
				path=dir & "\"
				filename="Engagements par type de frais"&year(Now)&month(Now)&hour(Now)&minute(Now)&second(Now)&".csv"
				file=path & filename
															
				while fso.FileExists(file)
					file=file&"_"
					filename=filename&"_"
				wend
					
				set inF = FSO.CreateTextFile(file)
				
				Dim XLstr
				For k=1 to 11
				
					XLStr=""				
					for j=1 to 16
						EcrireXL exportSaisine(k,j),XLStr			
					next
					inf.writeline XLStr
					
				Next
			End sub
			export%>
			
		<input type='button' onClick="Fexport('export/<%=filename%>')">
Merci