Exporting Data to Mail in CSV format - iphone

I have a list of Expenses Which include date,categoryName and Amount stored in Coredata.
I want them to be transferred in CSV Format to Mail.Can this be done?.I also want only the data in the current month to be sent.
I googled it and all i found is CHCSV parser and i have no idea on how to use it.

Converting your data to csv should be easy, just declare a mutable string, iterate over the objects you want to add and add the values you need to the string with comma seperation (best to enclose the data values in "", too). You can google on the csv format in wiki.
Then you write that string to a temp .csv file.
Then, using mfmailcomposer, you attach the .csv-file to the mail and you're done.
If you don't come up with a solution by googling these pieces of information, ask a more specific follow-up question here. But there are many resources on mfmailcomposer with examples out there.
Cheers

Related

Watson Studio Data Refine

I have two questions regarding the data refinery process in WS.
I have 200 Columns of data and when it was first loaded into the platform, by default everything is in the string type. How do I
Change columns in a batch
Specify the data type when I am uploading the data as using a CSV format file.
Regarding the first question, you can use operations (in Code an operation...) available from the dplyr R library. For example, in order to convert all double columns to the Double Type, you can use something like this:
mutate_all(~ ifelse(is.na(as.double(.x)),.x,as.double(.x)))
As for the second question, I think this is not possible, as long as you upload the data directly via browser.

Is there an emacs mode (or other editor) for editing binary records?

I'm looking for a way to view and edit files of fixed-length binary records with fields consisting of various raw data types like integer, string, etc.
There is no way to directly infer the format, but one could have a simple printf-like format descriptor like: "%12d: (%d, %f)\n" to parse and print out every single record.
One could also imagine more complicated dynamic records, for example, where one field indicates the length of the next. This could be combined with compression or other modes. The format could also be extended.
Has anyone seen anything with similar functionality? The closest mode I could find on the web is rec-mode for text-based records. I wrote a small ROOT TTree-based extension to print out such files, but it would be nice to edit them directly in emacs.

Writing text information to existing CSV file with Matlab

I am appending an array of numbers to an existing excel file using this:
dlmwrite(mydatafile,newdataarray,'-append');
I need to add a column to the beginning of the new row for a text identifier (employee name), but I can't get Matlab to write the name to a single cell. Does anyone have any ideas how I'd be able to do this?
Your question is not completely clear, for example it is not completely defined how you can add a column to a row.
If the following does not work I would recommend you to provide a small scale example of the data that you have and the things you want to append.
Assuming you just need to get this done and are not looking for a pretty solution you could try to:
First read it into matlab
Then perform the operation that you like
Then write it to a new file
This will allow you to do pretty much anything but whether it is convenient depends on your specific needs.

Add document to document library with additional column data using Powershell

I'm trying to loop through pdf files in a directory and send them to a sharepoint document library. When I send them I would like to add the customer, invoice, etc to the list as well. Anyone have recommendations?
Sure. This can done fairly easily. Here's the article I've used in the past for reference:
http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/23/use-powershell-cmdlets-to-manage-sharepoint-document-libraries.aspx
Setting metadata should be pretty easy as well, but PowerShell can't guess what a customer, invoice, etc is. So you'll have to have some data source. If the filename contains the data, you could split it. If the data is in the file itself, there are some methods of getting plaintext strings out of a PDF, but it's going to be a bit harder than the first part of your request.
Let me know if I can help further with any specifics.

Zend_Form: Newbie with non-standard form. Should I still use Zend_Form?

!!! UPDATED !!!
We have spreadsheets of complex product data coming in from multiple sources (internal, customers, vendors).
Since the authorship is so diverse, it's impractical to try governing formatting details such as column order and the number of header-rows.
These CSV spreadsheets will be uploaded to our DB via an existing form.
(My first Zend_Form ... I'm almost done with it)
The user needs to see a sample from a given spreadsheet so they can Map the columns and start-row.
To achieve that, I need to generate an html table of that dynamic content, and weave the form elements in and around the table data.
The user would select which values are to be found in each column, and identify the first row of data (after any header rows).
CLICK HERE to see an example.
(NOTE: Most of my work here is under an NDA, so contrived examples is the best we can get :)
In this example, I'd expect the output to be:
_POST('first_row'=>2, 'column0'=>'mi', 'column1'=>'lName', 'column2'=>'fName', 'column3'=>'gender')
With all those scpecifics mapped/defined, the uploaded spreadsheet can then be parsed and accurate data can be added to the product_history database.
Is ZF a good tool for this particular problem, or should I just write something from scratch?
How would you aproach this?
I am finally JUST BARELY starting to get this ZF stuff straight in my head, and this one has got me totally lost :)
Any and All advice appreciated.
~ Mo
I think in your case, using Zend_Form would be helpful for this situation.
The tricky part to it is of course that your forms are going to be largely dynamically generated on-the-fly based on the header and first row content of the CSV file.
Whether you used Zend_Form, or pure PHP, or some other solution, a lot of what you will be doing is the same (analyzing the CSV, providing dynamic inputs based on the CSV, and then error checking the selections). I think using Zend_Form has the advantage of making something like this very cleanly.
Given Zend_Form's nature, e.g. how it validates existing forms based on the elements added to the Zend_Form itself, you need to take a special approach with the form. Basically, after the user uploads the CSV once, you will create a Zend_Form object based on the number of columns, their positions in the CSV, and the name of the column.
Since you don't want to bother the user to upload the CSV multiple times if they make incorrect selections, I would parse the CSV into some sort of structure, maybe a simple object or array, and then build your Zend_Form based on that data. This way, you can save that structure to the session, so you can continue to regenerate the form based on the parsed data without having to read the file each time. This is because the main challenge with Zend_Form and dynamic forms, is that not only does the form need all of the elements and their properties when you want to display the form, but they are also required in order to validate the form and re-display the validated form.
I remember seeing this functionality many years ago in a PHP script, which I found is still available. Perhaps you could look at it for ideas. I won't post the link here since the screenshots and script are mostly adult website related and the site is NSFW for the most part, but it is called TGPX by JMBSoft. The 7th of the 8th screenshot on the main product page shows the import process where it lets the user map fields to data, exactly what you are doing.
Hope my advice is helpful, feel free to comment with any questions.