• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Edit .csv file without opening the file.

azazafzal

New Member
Hi

I am new to this forum and wanted some help related to vba.


I have a csv file which is a dump from the database, I want to edit the file columns (column A,B,C,D & E)name without opening it. I can't open the file as the data is too huge and it can't load all the data b'coz of rows restriction.


Any help would be appreciated.
 
Hi, azazafzal!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about questions in general...


If you haven't performed yet the search herein, try going to the topmost right zone of this page (Custom Search), type the keywords used in Tags field when creating the topic or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s) -if any posted below-, maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.


And about this question in particular...


Let synchronize our dictionaries:

a) There's no way you can edit a file without opening it, no matter if Excel, other Office files or any other file type. Directly or indirectly you should start/run some program or feature that opens it.

b) By "edit" you mean to modify (add, delete, update) or just open and retrieve?


Once done this, would you please tell us:

1) How many records are we talking about? File size?

2) What operations are you going to perform on those 5 column data?


Regards!
 
Good day azazafzal


If the csv file is to “too huge” to open then the data is being sent/presented wrong, there is no point if the user cannot open it!!

If you cannot “load the data” because of row restrictions then are you using the correct system? Perhaps with such a huge amount of data that has size restrictions in Excel you should be thinking of Access or some other true Database that can handle large amounts of data, Excel is perfect for analysing data but not for working with huge amounts.


If the data was in a database then you could very easily export the required data in to Excel so that it could be edited/analysed.
 
Hi SirJB7


I want to modify the column header. Currently the name are Field1 Field2 Field3 Field4 Field5 which I want to rename to Field@1 Field@2 and so on.

The reason why I can't open the file is because if I open the file it does not load all the rows which is there in the file. It omits rows after row 1048576 :-(
 
Hi, azazafzal!


I'd choose to do that either on the source database if it's possible or if it isn't then in the export process.


Despite of this, 2 questions:

a) Why do you want to only rename 5 column headings of a million-plus record exported DB? That's your edition process?

b) Suppose you yet renamed the headers, now what?


Regards!
 
I always use acccess via a linked table and/or a db table.


Then can write a query in access to change the data finally adding a connection in Excel to show the data. Best way for large data into a pivot table.


http://office.microsoft.com/en-us/access-help/import-or-link-to-data-in-a-text-file-HA001232227.aspx
 
Back
Top