setting filters and sort by column in google spreadsheets - gdata

I am exploring gdata python library for the purpose of uploading daily inventory reports on to google spreadsheets. I have been able to upload the csv and set the acl.
Since the staff I am sharing it with is not so gdocs savvy, I need auto filters to be applied before the spreadsheet is shared with them, so that they do not have to apply filter themselves.
I also need it to be sorted by a particular column.
Any help would be appreciated.

As far as I know, the google-docs-api does not contain support for the filters. You can check it out here:
https://developers.google.com/google-apps/spreadsheets/
From what I have learned, the api does not help with formatting cells, comments, or anything deeper than updating the contents of cells. You can create worksheets and spreadsheets, but I am not aware of anything that would be useful for your problem

Related

How to upload files and attachments to the sobject record using REST API?

Salesforce has two different UIs and in accordance with it, it has the possibility to store attached files differently.
Two files were uploaded via the classic UI and they are marked as 'attachments'. Other files were uploaded through the new UI and they are marked as 'files'.
I want to upload all of these files using REST API. I cannot find the proper documentation. Can somebody help me with this?
That's not 100% true. In SF Classic UI you were able to upload Files too. It's "just" about knowing the right API name of the table and you'll find lots of examples online.
Attachment and Document objects have exactly same API names, you can view their definitions in SOAP API definition or in REST API explorer (there was something which you can still see in screenshot in here, seems to be down now, maybe they're moving it to another area in documentation...)
The Files (incl. "Chatter Files") are stored in ContentDocument and ContentVersion object. The name is unexpected because long time ago SF purchased another company's product and it was called "Salesforce Content". In beginning it was bit of mess, now it's better integrated into whole platform but still some things lurk like File folders can be called Libraries sometimes in documentation but actual API name is ContentWorkspace. The entity relationship diagram can help a bit: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_erd_content.htm
ContentDocument is a header to which many places in SF link (imagine file wasting space on disk only once but being cross-linked from multiple records). It can have at least 1 version and if you need to update the document - you'd upload new version but all links in org wouldn't change, they'd still link to header.
So, how to use it?
REST API guide: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm
or maybe Chatter API guide (you tagged it with chatter so chances are you already use it): https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_files.htm
some of my answers here might help (shameless plug). They're about upload and reading data too and one is even about data loader... but you might experiment with exporting files first, get familiar with structure before you load?
https://stackoverflow.com/a/48668673/313628
https://stackoverflow.com/a/56268939/313628
https://stackoverflow.com/a/60284736/313628

Exporting in Netsuite

One of our customer's uses Netsuite ERP. We would like to be able accept pick tickets(orders) from them in a format that would allow us to import the pick tickets into our custom built ERP system. Naturally, I asked them if they could export the pick tickets as CSV to us.
They are attempting to build a custom report with all the fields we need and export it into csv. Aside from them having issues exporting the report only to HTML... Im curious as to why they cant just export the pick ticket they have been sending us, which is in pdf format.
On top of that. Ive noticed via SuitesScript you could modify the on click event to generate a csv of the data. So when they click generate print ticket, why could it not easily generate a csv at that time?
Basically, due to me not havign hands on to their NetSuite system - or any insight to the inner working of NetSuite, im looking to the community to explain to me, what they are doing wrong - or what the best solution is to attain the goal of: exporting a pick ticket(im assuming this is based from the sales order in netsuite...) in a friendly format, allowing me to automate the order entry into my company's system.
I am sure Netsuite provides CSV option for exporting Reports. Please refer to this doc.
To export a report:
On the Reports page, click the name of the report you want to see.
In the footer of the report, select Export-CSV, Export-Microsoft® Word, Export-Microsoft® Excel, or Export-PDF.
One possible problem may be the Role Permissions. Please refer to this.
If your search results pages do not include an Export button, your account administrator may not have assigned you the Full level for the Perform Search permission. This level is required for exporting search results. The Export Lists permission also is required. See Permissions for Searches.
you should be able to export pdf. Please refer to https://github.com/eliseobeltran/NSProject/blob/314c5a03c4251cd06d451527103b7b85bb63f130/GOP/Innov.GOP.GeneratePDF.js
Once you create the saved search, NetSuite has the option to export the saved search as the CSV, MS EXCEL, or PDF. But it's a manual approach. You can do it automatically by writing a JavaScript script in the Suite Script.

PDF generation from templated Word documents

I have a Word document(some template format) where it containing some placeholders for the data to be filled in and there are several Word documents like this which lies in some directory. When data comes I will be choosing different templates (based on some criteria) and fill the data and the documents have to be converted to PDF format.
I have been investigating Apache POI for this. If anyone has a good suggestion, it would be much appreciated.
As mbeckish mentioned you should indicate how you are going to run/automate this. For example is it one-off, run by hand or part of another program (and if so what programming languages do you use)?
If you are trying to automate it JODReports and Docmosis are tools that can use templates like you require and can produce PDF. JODReports is free. Docmosis is not but has several APIs. Please note I work for the company that develops Docmosis.
Hope that helps.
I've just uploaded this presentation, which presents three approaches for doing this.
Why not use any of existing PDF virtual printers?

Create a "tags" in filebrowser

I would like my admins to be able to upload files to the website. And I need to give those files some meta data so we can filter and display related files on the frontend. Can someone offer me a good workaround to do this?
I myself have struggled with this for many weeks. I can create a new taxonomy structure and with it a view to manage all the content or I can work with existing modules (but they don't meet my expectations).
Are there hooks available to "hack" into the filebrowser, so we can select the display of files on tags?
Check out http://drupal.org/project/media and http://drupal.org/project/file_entity Media has views integration and file_entity makes files fieldable.

Is there an alternative to open-xml sdk to generate word documents

I'm trying to generate word documents using open xml sdk. When the documents are small this is no problem (and rather easy). When the documents become larger (+500 pages) I notice the peformance (duration, memory usage, ...) goes down significantly.
Googling this problem I came across some posts that point out the same problem. For excel there is a solution with spreadsheetgear.
I would like to know if there is a word alternative to this or if there are other solutions to generate word documents?
Thanks,
Jelle
I've written a blog post series on generating Open XML WordprocessingML documents. The approach that I take is that you create a template Word document, insert content controls, and then write XPath expressions in those content controls to specify the XML to pull from a source XML data file. I've also explored another approach where you write C# code in Open XML content controls. That approach also works.
http://ericwhite.com/blog/map/generating-open-xml-wordprocessingml-documents-blog-post-series/
-Eric
You might look at http://docx.codeplex.com/
On Java, you could use docx4j. If you were brave, you could create DLLs for it via IKVM...
I decided to go with Aspose Words. It is really fast and not very demanding on resources (CPU, memory). It has the disadvantage that it is quite expensive. I also investigated Softartisans Office writer. The posibilities are the same but due to fact that the company I'm currently working for already used other Aspose components we decided to go with Aspose Word.