login about faq

I'm trying to make a UWP that pulls the data from a csv file and then sorts it alphabetically by column using the chilkat RTC for UWP more specifically the chilkat csv library , with that being said I wanted to first test it using the example code given on the chilkat website: https://www.example-code.com/csharp_winrt/csv_read.asp and https://www.example-code.com/csharp_winrt/csv_create.asp . However after I run the code both the methods LoadFile and SaveFile return Windows error 0x2: "The system cannot find the specified file." and windows error 0x5: "Access is denied." respectively. After some research, I found that since UWP doesn't allow access to the documents folder so I added the uap capability for documents folder to no avail. I just need some insight or at least a push in the right direction. I have been stuck on this for a while.

-Calvin

ChilkatLog:
  SaveFile:
    DllDate: Jun 15 2016
    ChilkatVersion: 9.5.0.58
    UnlockPrefix: NONE
    Architecture: Little Endian; 32-bit
    VerboseLogging: 0
    WindowsError: Access is denied.
    WindowsErrorCode: 0x5
    win32CreateFileAnsi failed.
    localFilePath: out.csv
    currentWorkingDirectory: \Windows
    localWindowsFilePath: out.csv
    filename: out.csv
    Failed to write complete file (7)
    Failed.
  --SaveFile
--ChilkatLog

ChilkatLog:
  LoadFile:
    DllDate: Jun 15 2016
    ChilkatVersion: 9.5.0.58
    UnlockPrefix: NONE
    Architecture: Little Endian; 32-bit
    VerboseLogging: 0
    WindowsError: The system cannot find the file specified.
    WindowsErrorCode: 0x2
    win32CreateFileAnsi failed.
    localFilePath: PGexcel.csv
    currentWorkingDirectory: \Windows
    localWindowsFilePath: PGexcel.csv
    Failed.
  --LoadFile
--ChilkatLog

asked Jun 20 at 13:32

calvincarter35's gravatar image

calvincarter35
1


If writing Windows Store apps, you'll want to learn more about read/writing/managing files in general. To get your application's data folder, do something like this:

StorageFolder folder = ApplicationData.Current.LocalFolder;
string csvPath = folder.Path + @"\PGexcel.csv";

link

answered Jun 20 at 16:19

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

edited Jun 20 at 16:20

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×21
×8
×7
×7
×6

Asked: Jun 20 at 13:32

Seen: 326 times

Last updated: Jun 20 at 16:20

powered by OSQA