Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
store Table into Data.bat(txt);
When I am trying to load the data into a txt file double quotes is getting added along with that.
For example:
If the original contains something like below.
"\\thrtjh568\qv\server\qvw\Development\QVD\Expense"
When it stores it into a txt file. It stores something like below.
""\\thrtjh568\qv\server\qvw\Development\QVD\Expense""
How can I eliminated double quotes when storing it in a text file. Please help!
Regards,
qvforum
Hi! did you find a solution? I have the same problem!!
regards, Emma
Hi Emma,
I have settled for writing out slightly malformed HTML, by not using double quotes in the text.
As far as I am aware there is not a solution. Pushing this thread back into view may turn something up though.
Steve
Hi Steve,
I had to settle with
(Get-Content Menu_List.html) | ForEach-Object { $_-replace '""', '"' } | Set-Content Menu_List.html
This cannot be the solution, though.
regards, Emma
this might be helpful
Writing HTML to file can cause one to run into three avoidable problems:
1. FIELD TRUNCATION:
Generating the HTML using LOAD INLINE will truncate your lines of code on commas which are being treated as field-delimiters.
We only want a single field, so avoid LOAD *, and most importantly, specify a non-printing-character delimiter:
LET vInlineDelim=CHR(07); // something that will not occur in text eg BEL
EMailOutput:
LOAD <!DOCTYPE html>
INLINE [
<!DOCTYPE html>
<html>
…… lines of html ….
</html>
] (DELIMITER IS ‘$(vInlineDelim)’);
2. DOUBLE QUOTES IN THE OUTPUT FILE
The next issue is caused by the STORE command, which ‘escapes’ quote marks by double-quoting as it attempts to create a CSV.
So, remove ALL single & double quotes from your HTML. However, for the HTML-tags still to work, you must also remove ALL SPACES from within tags:
<span style=font-family:Helvetica;font-weight:normal;Font-size:10pt;color:red> will give you Helvetica, red, 10pt.
<span style=font-family:Helvetica;font-weight:normal;Font-size:10pt;color: red> will give you Helvetica, 10pt but not in red, because of the leading space before “red”.
3. COMMAS CAUSING QUOTES AT START AND END OF RECORD
Any commas in the table’s field will by default cause STORE to enclose the field in double-quotes. To avoid this, include here also a DELIMITER IS:
STORE EMailOutput INTO [{filepath}EmailOutput.html] (txt, DELIMITER IS ‘$(vInlineDelim)’);