- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have tried using as suggested by you using LIBNAME XLSX and dataset. Here, is the code:
Code:
filename | error_msg |
test1.dat6 | No records |
But, want the following output:
filename | error_msg |
test1.dat2 | No records |
test1.dat4 | No records |
test1.dat6 | No records |
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Moksha wrote:
Just now, realized that the code I have mentioned is creating an excel file if doesn't exist already. Now, the problem is that I don't know what is happening and why I am getting error (shown in the screenshot) while opening the excel file after running the macro. Can you please help me how to write to the excel file successfully?
The f-functions like fopen() or fwrite() are for interaction with simple text files. Your code does not create an Excel file but a Text file with name Missing_records_in_source.xlsx
Only because you give this file a suffix of xlsx doesn't make it an Excel Workbook.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much for providing insights on fopen() and fwrite(). I was thinking that it is creating excel file.
- « Previous
- Next »