Jump to content

Make csv to open in excel with colums open


 Share

Recommended Posts

Im creating a csv from some array data of uninstall keys like this (needs Beta)

$sString = _ArrayToString($aList, ",", Default, Default, @CRLF) ; Make into .csv format Beta needed

FileWrite(@ScriptDir & '\Uninstall Logs\' & @OSVersion & ' ' & @UserName & ' ' & @MDAY & ' ' & @MON & ' ' & @MIN & ' ' & @SEC & '.csv', $sString)
MsgBox(64,'Finished', 'CSV Created', 2)

When i open it in excel 2013 it has the cells collapsed is there a way to make the csv remember to have colums maxed to the text within them?

Link to comment
Share on other sites

Cant find anything in either helpfile for that and from googling it appears to be an excel component?

I am only opening them with excel to read them not saving them with it

When i take the log (csv) they may not have excel installed.

I need it to be a csv component that is remembered when it is opened in excel

Link to comment
Share on other sites

You can't do that with a CSV. A CSV only contains data, no formatting information.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

You can't do that with a CSV. A CSV only contains data, no formatting information.

agreed. A CSV is really nothing more than a comma delimited file. Definition:

A comma-separated values (CSV) (also sometimes called character-separated values, because the separator character does not have to be a comma) file stores tabular data (numbers and text) in plain-text form.

 

Link to comment
Share on other sites

Ok thats a bust then

I will have to look at writing something that sits in the log folder and i run it before i start work on the logs

Open the csv, save them as excel on a loop and set the parameter (ActiveSheet.UsedRange.Columns.AutoFit) then close them

That seems to be the only sensible way 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...