1. Huubss
  2. RO CSVI
  3. Monday, 30 May 2022
  4.  Subscribe via email
Hello,

I have 2 questions. One is how to add some text? I have a custom fields that exports colors and I'd like to add " Color" to the value of the custom field. So instead of:

Pink
Purple
Green

I'd like to have

Pink Color
Purple Color
Green Color

In the columns. Is this possible? One caveat, when there is a certain value (No) I'd like to not add it to the field.

And another question, because the export is in CSV the layout and how the document looks is based on the program you open it with (Excel, OpenOffice or Numbers from Apple) which gives me issues. Is it possible to export the file as PDF and thus have 1 layout that looks the same on every computer opened?
Accepted Answer
Accepted Answer Pending Moderation
Hello,

Can you help me in what regexp that would entail? Tharuna helped me with these questions very good, where is she?
So she is always writing the regex for you? I should have a talk with her in that case ;) She will be back next week.

You can try something like this, that should match a space and then the word color.

/^\scolor$/


Is this possible, and if so how can I do this? How can I configure RO-CSV to do that?
Almost anything is possible. What you would need from RO CSVI is to run it as a CLI script, just like a cronjob and have RO CSVI export the file to a folder on the server. So your process would trigger RO CSVI, which when finished should give you the export file in a specified folder. Your script can then continue using that file. How to run RO CSVI as a cronjob can be found in the setting up a cron job document. Instead of running it as a cronjob, you just run the command directly from the command line. Does that help?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # Permalink
Accepted Answer Pending Moderation
Hello Huub,

Since you do not always want to replace a value, you can use the RO CSVI Multireplace rule to find and replace values. In your case you would need to add all the possible colors as the find option like Pink|Purple|Green and replace it with Pink Color|Purple Color|Green Color. I do not know which is more, the colors or the certain values. Otherwise you can use the option to always add the word Color at the end with the add after value option and then a second operation to remove the word Color if it matches No Color for example.

Is it possible to export the file as PDF and thus have 1 layout that looks the same on every computer opened?
We do not support PDF format. In the next release we do have added support for XLSX files. That may be a bit more consistent across these spreadsheets. Although CSV shouldn't really be an issue if you use the comma as field delimiter and double quotes as text enclosure. As that is the standard for CSV. However in Europe the comma is often replaced by a semi-colon.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hello Huub,

Since you do not always want to replace a value, you can use the RO CSVI Multireplace rule to find and replace values. In your case you would need to add all the possible colors as the find option like Pink|Purple|Green and replace it with Pink Color|Purple Color|Green Color. I do not know which is more, the colors or the certain values. Otherwise you can use the option to always add the word Color at the end with the add after value option and then a second operation to remove the word Color if it matches No Color for example.

Is it possible to export the file as PDF and thus have 1 layout that looks the same on every computer opened?
We do not support PDF format. In the next release we do have added support for XLSX files. That may be a bit more consistent across these spreadsheets. Although CSV shouldn't really be an issue if you use the comma as field delimiter and double quotes as text enclosure. As that is the standard for CSV. However in Europe the comma is often replaced by a semi-colon.


Ok thank you I will check for that.

Hmm okay, yeah the issue is regarding printing. So I always want to show the column headers as well as lines between the columns for easier reading.

Follow up question, is it possible to export the data or something to somewhere, like a text file, so I can use that text file to make the PDF myself?
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,

Follow up question, is it possible to export the data or something to somewhere, like a text file, so I can use that text file to make the PDF myself?
A CSV file is a text file :) The only thing I am thinking of is printing it from a spreadsheet but maybe add some dividing lines in there. Not even sure if that is possible or how but I would think it should be.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,

Follow up question, is it possible to export the data or something to somewhere, like a text file, so I can use that text file to make the PDF myself?
A CSV file is a text file :) The only thing I am thinking of is printing it from a spreadsheet but maybe add some dividing lines in there. Not even sure if that is possible or how but I would think it should be.


Yeah I know, I will test a bit and see if I can get a more clear question so you can understand me better. I basically would like to export the CSV file to my server and then I can use that file to set up a PDF file.

I have added the "add value after text" but is it also possible to only add that value when the field is empty? Now I have some cases where the text gets added and I cannot remove that text because I will basically have to remove the value that I just added...

Or is it maybe better using regular expression, only to replace when the field has the exact value of " color" and not when there is for example something before or after:

" color" -> replace with nothing
"something color" -> do not replace
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,

I have added the "add value after text" but is it also possible to only add that value when the field is empty?
This option has no conditionals.

Now I have some cases where the text gets added and I cannot remove that text because I will basically have to remove the value that I just added...
Yes, that is to be expected.

Or is it maybe better using regular expression, only to replace when the field has the exact value of " color" and not when there is for example something before or after
Regular expressions are also supported in the find and replace option. So you can use that to enter your regular expression and replacement. Which regular expression you would need, I do not know. To try out regular expressions you can use a site like regex101.com This works pretty good.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,

I have added the "add value after text" but is it also possible to only add that value when the field is empty?
This option has no conditionals.

Now I have some cases where the text gets added and I cannot remove that text because I will basically have to remove the value that I just added...
Yes, that is to be expected.

Or is it maybe better using regular expression, only to replace when the field has the exact value of " color" and not when there is for example something before or after
Regular expressions are also supported in the find and replace option. So you can use that to enter your regular expression and replacement. Which regular expression you would need, I do not know. To try out regular expressions you can use a site like regex101.com This works pretty good.


Can you help me in what regexp that would entail? Tharuna helped me with these questions very good, where is she?


Also the question regarding PDF. I want to build a script that runs a template, gets the contents of that CSV and use that to build my PDF with my PDF library in PHP. Is this possible, and if so how can I do this? How can I configure RO-CSV to do that?
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello,

Can you help me in what regexp that would entail? Tharuna helped me with these questions very good, where is she?
So she is always writing the regex for you? I should have a talk with her in that case ;) She will be back next week.


She gives me a nudge in the right direction, she is very helpful! Always very friendly and sorting the questions I have out. So nothing but love for her!




You can try something like this, that should match a space and then the word color.

/^\scolor$/



Thank you! I will see if I get it working with this start.

Is this possible, and if so how can I do this? How can I configure RO-CSV to do that?
Almost anything is possible. What you would need from RO CSVI is to run it as a CLI script, just like a cronjob and have RO CSVI export the file to a folder on the server. So your process would trigger RO CSVI, which when finished should give you the export file in a specified folder. Your script can then continue using that file. How to run RO CSVI as a cronjob can be found in the setting up a cron job document. Instead of running it as a cronjob, you just run the command directly from the command line. Does that help?

Yes that is very helpful, thank you!
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello,

She gives me a nudge in the right direction, she is very helpful! Always very friendly and sorting the questions I have out. So nothing but love for her!
Glad to hear that. She is enjoying a well-deserved holiday.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Thank you for the nudge, I got it working! The regular expression i used:

/\B color/
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
rolandd Any ETA for the new release? Else I just wait for the XSLX option to add styling.
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello Huub,

The release of RO CSVI 8.3.0 is scheduled for next week.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 11
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!