Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Stripping quotes from exported file?

Featured Replies

I have a simple file with about 10 fields. The data contained needs to be exported into a .txt file.

The issue I am having is that upon export the data has quotes like this:

"manufacturer","masrp","keywords",

is there a way to get rid of those so that it would look like:

manufacturer masrp keywords

I can achieve the latter by exporting as .tab however then the end user needs to manually rename the file to .txt (that is the extension that the export file has to have) which is what I am trying to avoid.

Any pointers are welcome.

Thanks.,

Can't you script the export, including the filename?

  • Author

Awesome, works without any problems.

Thanks a lot

Btw - can field names be exported as well?

Not directly. The merge format includes field names, but the data is comma-separated. The way to do this is by exporting as XML and using a custom stylesheet - see:

http://fmforums.com/forum/showtopic.php?tid/183442/

for something very similar.

  • Author

Thank you very much.

  • Author

Ok, implemented everything and all works as intended. I have however run into a small issue.

The export with the style sheet works as it needs to however I do have a description field in my table. When users enter the the text description they use enter if the description is long...

What would I need to add to the style sheet in order to filter out enter from all fields during the export?

Example: If no enter is used when inputting data the export comes out in one line as needed.

IE. This is a test export. Nicely done.

If they use enter when inputting data the export comes out like this:

IE. This is a test export.

Nicely done

Basically I do not know what to add to the style sheet in order to filter carriage returns out

The style sheet I am using is this, from the link provided by Comment, I believe it was posted by Fenton:

<?xml version='1.0' encoding='utf-8'?>



exclude-result-prefixes="fmp" version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">



	

	

	seller-id gtin isbn mfg-name mfg-part-number asin seller-sku title description main-image additional-images weight features listing-price msrp keywords product-set-id store-code category-id



		

		

			

			

			

					

					

						

							

						

						

							



						

						

						

					

								

		

		

	

You can use functions in your stylesheet to process the data. To "substitute" carriage returns with spaces, use the translate function, e.g.

You'd probably want to "trim" the result by using the normalize-space function so:

NOTE:

Replace [color:red]CR and [color:red]space with the corresponding character codes, or the actual characters.

Edited by Guest

  • Author

Thank you kindly.,

It works without an issue now.

  • Author

Yep, I hit an issue again. The file itself is working ok and all looks in order. However when I upload the exported file to the server, I get an error. It is basically telling me that the file failed due to the number of columns not being correct.

They require the file for the upload to be UTF-8, tab delimited.

Is there a difference between xsl and tab delimited exports?

When I export via xsl I get the error as described above. If I export via tab delimited file and manually type in the column headers I do not get the error.

I hard coded column names in xsl, I separated the columns via actual tab, I also tried

	

between columns and it still gave me the same error.

Any suggestions as to what might be wrong?

I can post exported files so they can be compared if needed.

Thanks.

Edited by Guest
Forgot to enclose the tab char in code.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.