How to change data type when export to CSV file?
How to change data type when export to CSV file?
Hi,
When i try to export Search report to CSV, in the popup search box i choose "Ticket Number" from "Add another attribute:" dropdown list, what if i want to change the data type of "Ticket Number" to Text/String instead of Integer?
Thanks.
Reagrds
When i try to export Search report to CSV, in the popup search box i choose "Ticket Number" from "Add another attribute:" dropdown list, what if i want to change the data type of "Ticket Number" to Text/String instead of Integer?
Thanks.
Reagrds
Re: How to change data type when export to CSV file?
CSV does not know these data types, you Excel is interpreting it as a number.
Rename file to .txt and import it, Excel should now ask
Rename file to .txt and import it, Excel should now ask
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: How to change data type when export to CSV file?
Hi jojo,
This is one of the solution, but i believe users might not want to to do all the time. So i want to change the field to "String" when export to CSV file. So users do not need to do the rename work.
Sometimes the integer field will auto convert from 123456789 to 1.01206E+15 in Excel.
Thanks.
This is one of the solution, but i believe users might not want to to do all the time. So i want to change the field to "String" when export to CSV file. So users do not need to do the rename work.
Sometimes the integer field will auto convert from 123456789 to 1.01206E+15 in Excel.
Thanks.
Re: How to change data type when export to CSV file?
CSV has no field types
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: How to change data type when export to CSV file?
Hi Jojo,
Ya, i knew. So i think i need to change the source code to customise it. before convert array to CVS, i might need to "hardcode" Ticket number as String data types.
Just do not know how to code it using Perl.
Thanks.
Ya, i knew. So i think i need to change the source code to customise it. before convert array to CVS, i might need to "hardcode" Ticket number as String data types.
Just do not know how to code it using Perl.
Thanks.
Re: How to change data type when export to CSV file?
the numer appears correctly in CSV file. YOu Excel interprets it. It needs to be solved in your spreadsheetsoftware (Excel)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: How to change data type when export to CSV file?
Hi jojo,
Yes, i can change the format manually thru Excel, but i dont want users to do it manually.
Currentlly when export to CVS, the value of Ticket number will become 1.04205E+15 instead of 104205251000010
How to disable the autoformat in excel? Because i cant find the solution in Excel, that is why i am thinking to change the source code.
Thanks.
Yes, i can change the format manually thru Excel, but i dont want users to do it manually.
Currentlly when export to CVS, the value of Ticket number will become 1.04205E+15 instead of 104205251000010
How to disable the autoformat in excel? Because i cant find the solution in Excel, that is why i am thinking to change the source code.
Thanks.
Re: How to change data type when export to CSV file?
Rename file to .txt and import it, Excel should now ask
Or use Open Office
Or use Open Office
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: How to change data type when export to CSV file?
Hi jojo,
Ya it works if rename the extension, but i prefer is to provide management users a proper report.
Means they do not need to go thru the CSV wizard.
The simplest way to that is change the Ticket Number data type to String from Integer.
Or,
There is a "on/off" in Excel, not to auto format the value of Ticket Number.
Any idea?
Thanks.
Ya it works if rename the extension, but i prefer is to provide management users a proper report.
Means they do not need to go thru the CSV wizard.
The simplest way to that is change the Ticket Number data type to String from Integer.
Or,
There is a "on/off" in Excel, not to auto format the value of Ticket Number.
Any idea?
Thanks.