I am exporting the spv file to an html format. I want to have the file name as the current date( eg. November292012). I am first trying to save it as some name. It gives me an error when I run the code below.
OUTPUT EXPORT /CONTENTS EXPORT=ALL LAYERS=PRINTSETTING MODELVIEWS=PRINTSETTING /HTML DOCUMENTFILE='c:\temp\%s.htm' NOTESCAPTIONS=YES STYLING=YES IMAGEFORMAT=JPG /JPG PERCENTSIZE=100 GRAYSCALE=NO
This topic has been locked.
2 replies Latest Post - 2012-11-29T18:21:44Z by spssdeveloper
Pinned topic python script to export
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-11-29T18:21:44Z at 2012-11-29T18:21:44Z by spssdeveloper
SystemAdmin 110000D4XK2077 PostsACCEPTED ANSWER
Re: python script to export2012-11-29T18:17:07Z in response to spssdeveloper\ characters in a Python string are used as escapes, so \t means a tab character. It's looking for a directory named c:<tab>emp, which is not what you want.
There are three ways to fix this.
1. Precede the literal with r, .e., r"""...
That means a "raw" string, so \ is not treated as an escape character.
2. Write the path using / instead. Both \ and / are honored by Statistics
3. Double the backslash, e.g., c:\\temp...
I always use both #1 and #2.