How to Find, Replace, and Save Data in Excel Across Multiple Rows?

AnotherDay

Новичок
Регистрация
22.08.2018
Сообщения
3
Благодарностей
0
Баллы
1
Hey Guys,

Just getting my head around ZP, really liking it so far, but I've run into a bit of a dead end with one of my projects.

Hopefully you guys can help, so here goes;

What I've got

6 sequential rows in an excel .csv file with data in various cells in each line from column A2 - DI2.

In some cells part of the data is in the form of a place holder.

So, for example, in cell A2 I might have [ %PLACEHOLDER% Some text ]

Then in cell I2 I might have [ %PLACEHOLDER% Some other text ]. And so on throughout the 6 Rows.

This is my template.

EXAMPLE





What I need to do

Take those 6 rows from the template in there entirety, replace all instances of %PLACEHOLDER% within every cell where it's present with the same single value from my list, then save the amended version to a separate CSV file, formatted exactly the same as the original template. The data to replace the placeholder with is in a separate list (.txt file).

Then I need to do it again, and again, each time replacing the %PLACEHOLDER% with another line from my list, and adding the 6 amended rows to the same .csv file as before.

Anyone got any ideas?

Thanks in advance.
 

AnotherDay

Новичок
Регистрация
22.08.2018
Сообщения
3
Благодарностей
0
Баллы
1
I came up with a solution in the end. I'll post it in case it helps anyone else....

Not pretty, but rather than messing around with tables and excel it was easier just to have all the .csv data in a 'template' .txt file, then use ZP to load the template, replace the required data (pulled from a list), then save the outcome in a 'results' txt file (adding onto it each time). Then, when completed, manually copy/paste all the data (at once) from the saved 'results' .txt file into column A in an excel sheet and use the 'text to columns' feature (in excel) to put the data back in the right columns again.
 

Nick

Client
Регистрация
22.07.2014
Сообщения
1 980
Благодарностей
816
Баллы
113
That's a really indirect way. You could either use standard blocks to work with table or write a C# code (use examples from ZennoLab wiki) to go through rows and replace whatever you need. An experienced user could do it in 15 minutes. You just lack some experience.
 
  • Спасибо
Реакции: AnotherDay

AnotherDay

Новичок
Регистрация
22.08.2018
Сообщения
3
Благодарностей
0
Баллы
1
That's a really indirect way. You could either use standard blocks to work with table or write a C# code (use examples from ZennoLab wiki) to go through rows and replace whatever you need. An experienced user could do it in 15 minutes. You just lack some experience.
Awesome, thanks! I'll look into those ideas when I next get some free time. Thanks again.
 

Кто просматривает тему: (Всего: 2, Пользователи: 0, Гости: 2)