I wonder if it is possible to set the size of columns based on the content they contain. I would like when you open the CSV once it has been directly generate columns are the right size.
For write in the CSV I have this code :
$csvFile = fopen(CSV_FILE, $writeMode);
$searchStr = array(";");
$replaceStr = array(",");
foreach ($csvArray as $csvArrayRow) {
fwrite($csvFile, iconv("UTF-8", "Windows-1252",str_replace($searchStr, $replaceStr, html_entity_decode($csvArrayRow["title"], ENT_HTML401 | ENT_QUOTES, "UTF-8")).";"));
fwrite($csvFile, iconv("UTF-8", "Windows-1252",str_replace($searchStr, $replaceStr, html_entity_decode($csvArrayRow["author"], ENT_HTML401 | ENT_QUOTES, "UTF-8")).";"));
fwrite($csvFile, $csvArrayRow["date"].";"."\n");
}
fclose($csvFile);
echo json_encode(array(count($csvArray)));
exit;
It is possible to add something to resize columns or is it somewhere else?