CSV File attributes

samahiji

Board Regular
Joined
Oct 6, 2015
Messages
82
Office Version
  1. 2019
Platform
  1. Windows
Hello

I have Excel vba that merges CVSs files and produce one master file.

I want now to add file attributes to the master csv file. The date and time was easily retrieved using fileDateTime function. Is there a similar function to get the owner/author for that file?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Document attributes are NOT stored in a CSV file. Only the text is stored. (Unless it's part of the text.)

If you want to store those values, you'll have to save it as something other than a CSV file.
 
Upvote 0
Below this
Code:
        'Save text file as a Excel file
        Set WB = ActiveWorkbook
insert this
Code:
        'Insert the computer user name to the top of the dataset.
        Set Rng = WB.Worksheets(1).Range("A1")
        Rng.EntireRow.Insert
        Rng = Application.UserName

Keep in mind that a CSV file is a text file. It does not store any addition information about the file in the data. It just seems like it's a Excel file because Excel does a really good job of opening it without going through the import wizard.
 
Upvote 0
Thanks a lot.

work like a charm!! ?

I just shifted the output to another cell to keep the source data safe.
 
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,554
Members
448,970
Latest member
kennimack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top