<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Failed to open file in write mode for file *.csv in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Failed-to-open-file-in-write-mode-for-file-csv/m-p/1758498#M453892</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/50003"&gt;@vmonitor&lt;/a&gt;&amp;nbsp;This is not really a question for this forum, as what you want to do is 'system' level function, not a QlikView API call as far as I can see, so your best bet would be to search the Microsoft Forums in this case I believe to see if you can find what you need over there.&amp;nbsp; The best solution would likely be to exclude that file from backup routine and manually do that task if you need a copy of it, or if you have Publisher, maybe setup a Supporting Task External Program task that would do the backup via copy/paste etc...&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2020 15:47:12 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2020-11-04T15:47:12Z</dc:date>
    <item>
      <title>Failed to open file in write mode for file *.csv</title>
      <link>https://community.qlik.com/t5/QlikView/Failed-to-open-file-in-write-mode-for-file-csv/m-p/1753987#M453703</link>
      <description>&lt;P&gt;I have a script that runs every 3 minutes. Sometimes it stops at night due to the fact that it is impossible to write the file (&lt;SPAN class="lia-message-read"&gt;"Failed to open file in write mode for file list.csv"&lt;/SPAN&gt;). I know that the most likely reason for this is the backup. How can I change my macro for recording files to work around the problem?&lt;/P&gt;&lt;P&gt;Sub ExportToCSV&lt;/P&gt;&lt;P&gt;set obj= ActiveDocument.GetSheetObject("LB04")&lt;BR /&gt;obj.Export "E:\Qlik\list.csv",","&lt;BR /&gt;End Sub&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 08:38:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Failed-to-open-file-in-write-mode-for-file-csv/m-p/1753987#M453703</guid>
      <dc:creator>vmonitor</dc:creator>
      <dc:date>2020-10-20T08:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to open file in write mode for file *.csv</title>
      <link>https://community.qlik.com/t5/QlikView/Failed-to-open-file-in-write-mode-for-file-csv/m-p/1758498#M453892</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/50003"&gt;@vmonitor&lt;/a&gt;&amp;nbsp;This is not really a question for this forum, as what you want to do is 'system' level function, not a QlikView API call as far as I can see, so your best bet would be to search the Microsoft Forums in this case I believe to see if you can find what you need over there.&amp;nbsp; The best solution would likely be to exclude that file from backup routine and manually do that task if you need a copy of it, or if you have Publisher, maybe setup a Supporting Task External Program task that would do the backup via copy/paste etc...&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 15:47:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Failed-to-open-file-in-write-mode-for-file-csv/m-p/1758498#M453892</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-11-04T15:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to open file in write mode for file *.csv</title>
      <link>https://community.qlik.com/t5/QlikView/Failed-to-open-file-in-write-mode-for-file-csv/m-p/1758515#M453894</link>
      <description>&lt;P&gt;You may add some logic to check if this file exists or if the file is locked before you export your csv. Like &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14114"&gt;@Brett_Bleess&lt;/a&gt;&amp;nbsp;mentioned would here the MS vbs/vba forum more appropriate to get examples how it could be done.&lt;/P&gt;&lt;P&gt;Another approach would to be to implement an error-handling and because of the fact that your export is triggered every 3 minutes you won't really need a query for err.number to decide / to branch what should be done in the case of an error else probably it's enough to skip the error. This means something like this:&lt;/P&gt;&lt;P&gt;Sub ExportToCSV&lt;/P&gt;&lt;P&gt;set obj= ActiveDocument.GetSheetObject("LB04")&lt;BR /&gt;&lt;STRONG&gt;On Error Resume Next&lt;/STRONG&gt;&lt;BR /&gt;obj.Export "E:\Qlik\list.csv",","&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 16:08:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Failed-to-open-file-in-write-mode-for-file-csv/m-p/1758515#M453894</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-11-04T16:08:16Z</dc:date>
    </item>
  </channel>
</rss>

