PHPOffice / PHPExcel

ARCHIVED
Other
11.46k stars 4.19k forks source link

unix format XLS #1253

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello there, i m using PHP exell to convert CSV files to XLS Office format files,

my problém is the format of the files, i need to have a Unix (LF) format, but phpExcel create a Macintosh (CR) format, how export a :

what i need : image

What PhpExcell Create :

can we change this formet when i save my XLS files please ?

thanks

PowerKiKi commented 7 years ago

XLS is a binary format and thus end of lines are not relevant. XLS files created by PHPExcel work on all OS with all major software (including LibreOffice).

ghost commented 7 years ago

Hello, of cours works with all major software, but we need o way to change the line format

i m still stuck with that

i have to open my files with libreOffice and savez the files in XLS format to change the UNIX stuff line.

can we make it direct with PHPExcel ?

What means :

thus end of lines are not relevant ?

it' will be interesting to have an option when u save files to know what is the line using by phpExcell to save files ?

PowerKiKi commented 7 years ago

It means you must not do anything with end of line. And it is not possible with PHPExcel to do what you want, because it would break the file.

MarkBaker commented 7 years ago

XLS files don't have a line ending format, so PHPExcel doesn't have any option to change something that doesn't exist.... nor can I understand what your actual problem is, because you're original question seems to be missing some information, such as what PHPExcel actually creates compared with what you want to create. A sample csv file that causes your problem so we can try to replicate it would also help

ghost commented 7 years ago

thanks to you

the way is,

when u create XLS files with PHPExell, and when u edit the files created with notepad++ u can see the end of line is Macintosh (CR) , and this is my problem. image

but when u create a XLS files with libreOffice (using it in windows 10) So the XLS files editing in notepad++ says the files is UNIX (LF) image

i need some PHPExcell files with UNix (LF) files and not Macintosh (CR).

i think, i need to found in the source code of PHPExcell where u create this endOfLine and get a way to change it

thanks

MarkBaker commented 7 years ago

Where do you see the line endings in the binary xls file? It's a binary format, not a flat file format with line endings, so what Notepad++ says should be completely irrelevant.... xls files are never intended to be displayed in a text editor, but in an application that actually parses the binary format.

I'm still completely unclear about your problem.... what happens when you open this XLS file in MS Excel, or in OpenOffice? Does it display correctly there?

ghost commented 7 years ago

Yes th files works perftcly in Microsoft EXCELL or libreOffice.

PowerKiKi commented 7 years ago

I think the real question here is why do you try to vewi/edit a XLS file with a text editor ?