Store metadata for a spreadsheetgear cell - spreadsheetgear

Is there a way to store custom metadata for a Cell using the SpreadsheetGear control? I need the metadata to persist when saved to an XLSX file. (I am wanting to store some data binding information which is basically an arbitrary string). I could use a comment, but that is not the optimal because it shows a visual marker.
Similarly, is there a way to store custom metadata for a WorkSheet or WorkBook? A Chart?
Could I use an excel SmartTag? (I don't see Spreadsheetgear support for SmartTags).
Joseph

To store metadata for my spreadsheetgear reporting application, I save a .metadata file along with the .xlsx file. I keep a dictionary of metadata for each image on the spreadsheet with the key being the image ID. I also keep metadata for each worksheet with the name of the worksheet being the key. This upside is that you can store any arbitrary metadata, the downside is that you have to keep the two in sync (for example if an image gets deleted or a worksheet gets renamed).

Related

Is it possible to save PSPDFDocumentEditor's document that uses custom data provider

I am trying to us PDF editing feature of PSPDFViewController, but my application has a limitation that all data should be read/write on disk using secure file manger. So for this purpose I am using custom PSPDFDataProviding protocol implementation that handles read and writes. But when I try to edit such document (e.g. add pages) using PSPDFDocumentEditorViewController, after pressing done I get saving dialog with only "Save as" option that leads to external storages.
If I create PSPDFDocument using on disk file URL it allows to save edited document in the same location, but doesn't allow me to control data read/write? Is there any way to store edited document using PSPDFDocument with custom data provider?

Is there any way to store KML file in Core data

Is there any way to store KML file in Core data because i have to send the KML file with some parameters and i have to save KML file along with these Parameters is there any way to store the KML file in Core Data.
Thanks in Advance
There are three possible solutions:
1) Save the files to the file system in the documents directory. Store the relative path in core data. Make sure to store the relative path not the absolute path, as the absolute path may change. This allows you to store meta data about each file but keep the saving and reading of those file separate from core data
2) Store the files in core data as binary data. In your core data model there is an option to set a property as Store in External Record File - you should set it. Also if you don't want to load the file into memory every time you access other meta data that is stored in the Entity then should should store the binary data in a separate entity with a relation to the metadata entity
3) You can also discard the KML and store all the information in it in core data with custom Entities and objects. If you want to search or sort KML files based on the data inside of them then you will have to parse them and store at least some of its information in core-data. (Perhaps that is what you intended when you said "some parameters"?). For some application it might be the best approach to parse the entire file and put ALL of the data into core data and the discard the files. It depends on your application.
I would recommend approach 1.

Saving data in non-document based application

I have an app similar structured to the new Notes app. A sidebar contains information about different files (date, title, excerpt) and the detail view shows the whole content.
To store data in my app, I use NSKeyedArchiver. Each file is stored seperatly to make iCloud Sync easier.
So here is my question: Is there any good way of storing and loading this data in the sidebar?
The problem is that when the app starts, it iterates through every available file to load the information needed. However, the whole object graph loads for each file even if I only need the date and the title. Is there anything I can do to optimize this?
Should I use a seperatly index file where all dates and titles are stored?
Am I using the wrong storage concept?
Any advice would be appreciated!
Sounds like what you need to do is store the key information (date and title) separately from the rest of the data.
When you start the app, you can load the key information and display it, then retrieve the rest of the data only when required, by linking the title to the content.
You could use CoreData for this - but probably overkill.
Realm will work very well for this. There's a good tutorial available here http://www.raywenderlich.com/112544/realm-tutorial-getting-started

CKAN upload custom format tsv on schedule

I am trying to upload custom formatted data files from the UK climate site e.g.this file. There are 5 lines of metadata and 1 header line.
1) Can CKAN preprocess the file according to a format I give it so that only data are picked up. Possibly saving the metadata in the description?
I would prefer a frontend option because I want users to be able to do this themselves.
2) Is it possible to have a dataset uploaded automatically once the url is entered. I currently have to go to the manage -> datastore page and click on upload to datastore to have the data populated.
3) Can the dataset be updated at a regular interval?
Thanks
Not currently. Doing ETL on incoming data is something that is discussed a lot recently, so it may happen soon.
You shouldn't have to manually trigger a load into datastore. Is this when creating a new resource, or if you're editing an existing resource? When editing a resource I believe it is only triggered if the URL changes.
You can use https://github.com/ckan/ckanext-harvest to have data pulled into CKAN on a regular schedule - there are harvesters for various different stores, so it depends on where it is updated from.

App uses Core Data - how to implement a "print report" feature?

My app uses Core Data to store 6 attributes for each entry as well as an image. I have several users asking for a feature where they can print out what they've entered. I can export the core data entries to a .csv file, but what about the images? cvs isn't pretty for the common user. They'd have to pull it into a spreadsheet app (if they have one) and play around with it to make it usable. But there's no way to export images into a .csv file.
What I'd really like is a way to push a button and have the app generate a report or a .pdf or something that they can email to themselves, or pull out of iTunes and it'll be formatted in rows with the entries, attributes and the images.
Any ideas? Can anyone point me to something that I can pass my core data attributes (6 text strings and an image) and output them to a pretty .pdf or webpage?
For this requirement, it should be fairly easy to create your own extremely simple HTML templating method.
Pick one sample entity and create a HTML page that formats it the way you want. Replace the actual data from the entity with placeholder text strings that you can search for at run time. Copy this template into your project. When the user presses the button, open the template, merge in the actual data, and save the result as a new HTML file or mail message.
If you want something more flexible, try searching GitHub for "HTML templating" or look at http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/

Resources