CSV file not recognised - csv

I am creating a CSV file in my system and MFT to another. When they receive it, their job does not pick up the file. When they open the file in excel, save it locally and reload the same file, the job picks up the records. I can't figure out what could be wrong with the file I create or something wrong with their job? Anyone experienced something similar?
Appreciate any ideas.
Thanks

With such a few details no one rather than you can find what's wrong.
My suggestion would be to get two files: one - the original file that the job does not want to deal with; second - the file that the job can consume (saved via Excel). Then open this two files in a notepad and try to find any differences.

Related

Getting Minizinc output as .txt from IDE

Imagine I ran a .mzn with .dzn and got an output in IDE as follows:
Supplier01,100,100,100,100,100,100,100,100,100,100,100,100
Supplier02,200,200,200,200,200,200,200,200,200,200,200,200
Supplier03,40,49,359,834,1067,1377,334,516,761,1001,1251,1583
Supplier04,500,500,500,500,500,500,500,500,500,500,500,500
Supplier05,161,200,200,200,200,200,200,200,200,200,200,200
Supplier06,500,500,500,500,500,500,500,500,500,500,500,500
----------
==========
Is there any way that I can generate this output in a .txt or .csv file in a preferred location on my computer? I know that we can perform this in command prompt, but is there any way we can do using the IDE it self?
The MiniZinc IDE currently does not include functionality to export solutions for other applications.
The current expectation is that if you want to integrate MiniZinc with other applications that you would use something like MiniZinc Python, iMiniZinc, or the command line tools, to facilitate the connection. In your case using MiniZinc Python or iMiniZinc might be a good solution since Python can generate csv files using the csv module. If you want to see and interact with the solution as well as outputting the csv file, then iMiniZinc can provide the right tooling in Jupyter Notebook to do both.
If you are very happy with the MiniZinc IDE and you want to continue using it, then the other option would to just minimize the inconvenience. Your output statement already provides the solution in csv style. So the only remaining part is making the file. The MiniZinc IDE can open .csv files. So my suggestion would in this case be to create an empty .csv file, open it in the IDE. Once you get the solution from your instance in the output window, then you copy directly into the file.

Chrome extension how to append or edit a csv file on pc

I am able to find some information on how to read a csv file on a computer but is there any way I can modify one? In my chrome extension I need to add data to each row one at a time after scraping some websites. Is there any better way then read csv, store data as variable and rewrite is everytime? This becomes problematic when the file gets large. I am looking for a way to “append ” to a existing file or a work around. Any suggestions appreciated.
Update: From comment I see it is not possible to read from file system. But is there anyway to read from within the extension directory? How should I do so if the csv file is included with in the zip file of the extension? Can I access them somehow? Code snippets would be helpful.
I'm in the middle of creating something which might help you. Right now you can upload the CSV file and append a "modifier". You can adjust the code according to your requirement. Here's the repo https://github.com/amanrOnly/CSV_Modifier

What is a good way to format a CSV file to be crawled in AWS Glue?

I currently have a CSV file with 200k lines that look like this
id,path,username,folderid
32423423424,asfasf-232-3,cooluser,234324-234-34324-424
When the crawler finishes, it does say it created the table and I can see the table details. When I try to preview the data in athena it returns zero records. The CSV file is stored in a S3 bucket, all permissions are correct.
Thanks.
Try keeping the file inside a particular folder and point the crawler towards the folder. I think this would work rather than pointing towards a particular file.

Generate an XES file from an event log in CSV format

Could someone help me out on how to generate an xes file from a csv file containing event logs. I tried many websites, tutorials but failing all the time.
Because, they aren't providing adequate information. Kindly help me.
Here you go: Importing CSV files using the ProM 6.5 Log package
You'll need the latest ProM-Version for that from www.promtools.org

renaming html file to have parent directory name

I have a directory tree in which each folder contains (at this point) a single html file, all with the same name.
I would like to rename each file so that it has the name of its parent directory.
For example, change
A\B\file1.html
A\C\file1.html
A\C\D\file1.html
E\file1.html
to
A\B\B.html
A\C\C.html
A\C\D\D.html
E\E.html
I did see another similar post on a similar problem for mp3 files, but was unable to adapt it.
I am pretty much a novice at this - been trying to find a way using Notepad++ and the Windows Command Prompt window, but no real idea so far.
Any suggestions greatly appreciated.
Do you need to do this via code or do you just need an utility?
For bulk renaming of files I've been having a lot of luck using Bulk Rename Utility.
http://www.bulkrenameutility.co.uk/