ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clear selection in CSV-file (https://www.excelbanter.com/excel-programming/417319-clear-selection-csv-file.html)

kemp

Clear selection in CSV-file
 
I need to save a sheet in csv-format. If I clear a range before saving, this
range appear in the csv-file as lines with comma separation. If I delete the
range, it does not appear in the csv-file at all. I want this, but I can not
use the delete method - how can it be done with a clear method ? can anybody
help or explain ?

Thanks

Bob Bridges[_2_]

Clear selection in CSV-file
 
I'm confused, so I'm going to be obnoxiously literal in order to get to the
bottom of the misunderstanding, like this: "Apparently you CAN use the
delete method, for you just told us that it does what you want. Did you mean
you MUST not use the delete method?".

And to add to that, I don't really understand what the difference is between
..Delete and .Clear. Is it just the warning message that's displayed to the
user with .Delete? Why exactly do you prefer the one to the other?

--- "kemp" wrote:
I need to save a sheet in csv-format. If I clear a range before saving, this
range appear in the csv-file as lines with comma separation. If I delete the
range, it does not appear in the csv-file at all. I want this, but I can not
use the delete method - how can it be done with a clear method ? can anybody
help or explain ?


kemp

Clear selection in CSV-file
 
Hi Bob,
Thanks for answer.
Let me explain:
If I clear range (eg 3 rows, 3 coloums) it appear like this with 3 lines in
the csv-file:
,,,
,,,
,,,

If I delete range (eg 3 rows, 3 coloums) it appear without the commas, like
the 3 line not existing.

I want it to appear like the delete method, but I want to use the clear
method, beacause the delete method will broke som references within the Excel
workbook between some sheets.

Regards
Kent







"Bob Bridges" skrev:

I'm confused, so I'm going to be obnoxiously literal in order to get to the
bottom of the misunderstanding, like this: "Apparently you CAN use the
delete method, for you just told us that it does what you want. Did you mean
you MUST not use the delete method?".

And to add to that, I don't really understand what the difference is between
.Delete and .Clear. Is it just the warning message that's displayed to the
user with .Delete? Why exactly do you prefer the one to the other?

--- "kemp" wrote:
I need to save a sheet in csv-format. If I clear a range before saving, this
range appear in the csv-file as lines with comma separation. If I delete the
range, it does not appear in the csv-file at all. I want this, but I can not
use the delete method - how can it be done with a clear method ? can anybody
help or explain ?


Bob Bridges[_2_]

Clear selection in CSV-file
 
I see I forgot to reply to this; I apologize for that, if it's not too late
already. Ok, I guess I see what the difference is between .Delete and
..Clear, but it seems to me that if .Delete breaks your workbook -- if there
are cells elsewhere that refer to these cells -- then you're just trying to
have it both ways, as though these cells both exist (in your worksheet) and
do not exist (in the printout). I'm all for having things both ways, if
possible, but in this case, how...?

Well, can you have those other cells point to a different range than the
thing you want to delete?

--- "kemp" wrote:
If I clear range (eg 3 rows, 3 coloums) it appear like this with 3 lines in
the csv-file:
,,,
,,,
,,,

If I delete range (eg 3 rows, 3 coloums) it appear without the commas, like
the 3 line not existing.

I want it to appear like the delete method, but I want to use the clear
method, beacause the delete method will broke som references within the
Excel workbook between some sheets.

--- "Bob Bridges" skrev:
I'm confused, so I'm going to be obnoxiously literal in order to get to the
bottom of the misunderstanding, like this: "Apparently you CAN use the
delete method, for you just told us that it does what you want. Did you mean
you MUST not use the delete method?".

And to add to that, I don't really understand what the difference is between
.Delete and .Clear. Is it just the warning message that's displayed to the
user with .Delete? Why exactly do you prefer the one to the other?

--- "kemp" wrote:
I need to save a sheet in csv-format. If I clear a range before saving, this
range appear in the csv-file as lines with comma separation. If I delete the
range, it does not appear in the csv-file at all. I want this, but I can not
use the delete method - how can it be done with a clear method ?



All times are GMT +1. The time now is 12:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com