XPages import from excel - excel

I want to import an excel file using XPages.
The user can only select an excel file then Javascript codes will handle rest.
I mean it's like a fileUpload window but the file type of file that user can select should be only excel files.
Any suggesstion is important
C.A.

If your question is about how to restrict the file type, there is a property in the upload control called accept
More information http://xpageswiki.com/apps/wiki-xpages/wiki-xpages.nsf/dx/Work_with_a_file_upload_and_download_controls#Limiting+file+types+for+upload
and also it is shown the second image at this link here: https://www-10.lotus.com/ldd/ddwiki.nsf/dx/Limiting_MIME_types_with_IBM_Lotus_Domino_8.5_XPage_file_upload_control#Adding+the+upload+control+to+your+XPage+or+custom+control

Related

Best way to view excel files in blade views

I currently generate excel files in my controller and store it in my storage path, thus I have an api to return the excel file but I want to let the user view it in the blade view. What is the best way or easiest way of doing this? Is putting the excel file in the iframe possible? As I know it is possible if the excel file is from the web and not from my own api/project path. The api that returns the excel file actually downloads the file straight away and does not just return the excel file's data
As commented above...
You may use Handsontable JavaScript plugin. It will help you get an excel-like interface.
Alternatively, you can process the excel data and simply display the data in a table

How to import excel file to fill labels which is in apex?

I have a page on APEX which has several labels.User should fill these labels to create new record.But this is a new application.The company has used excel to keep these records.Now It is the problem;
Users want to have a option that import excel file and excel file's cells fill required labels.I can not find any method to do that.
Thanks
As far as I an tell, you can't do it on that page.
What you can do is to create a Data Loading process. How? Create a new page and choose ... well, Data Loading page type. The Wizard will lead you through the process (there's no sense in typing it over here).
Once you're done, Apex will create 4 pages which will cover the whole process:
choose the source
perform mapping
data validation
display the final result
and let you load data stored in those files. Though, you can't import the native Excel file (.XLS or .XLSX) - save that file as a .CSV (comma-separated values) and then use it as data source for the loading process.

Domino Designer: Export a view to CSV File using formula language

In Domino Designer, I would like to export a view to CSV file, with the details as per below:
Select all document
In UTF-8
Include Column Title
I tried to use formula language to at least export it to csv, and save it at the current user's desktop, but it seems like %UserProfile% is not working.
#Command([FileExport];"Comma Separated Value";"C:\Users\%UserProfile%\Desktop\temp.csv")
I have tried to change "%UserProfile%" with Public, and it works, but preferably I wish it could be done using current user profile.
My questions are:
Can I use formula language to code something like this?
Is there any lotusscript similar to my description as above (i.e The CSV file can be exported only by one click?
Thank you in advance.
No
Yes, see example as a starting point.

Make Infragistics UltraGrid Document Exporter launch file

We have an existing application that allows exporting of an Infragistics data grid to either Excel or PDF format. Currently, when the user clicks on the Export button, it asks them where to save the file and then it exports it and saves it. Then, to launch it, they go to where they saved it and then it launches.
The user wants the application to instead launch the grid into either Adobe Acrobat or Excel and THEN that is where the user can opt to save the file. They don't want it to ask where you wish to save it before it exports, like it currently is doing now.
Is this possible with the Infragistics Document Exporter? I couldn't find any information on this from the Infragistics web site.
I'm thinking, instead of giving it a filename, I could instead use a stream maybe to the console or something like that and let the OS give the user the option to launch it?
Is there an example somewhere of this being done? I see there is an overload in the Export member function that allows you to pass in a stream.
Thanks!.
The Infragistics excel engine and documents engine will need to write to a file to be able to have the file opened in Excel or Adobe Acrobat so you will still need to save a file before they can open it.
For the requirement to open the file, you could use System.Diagnostics.Process.Start method and if there is a program associated with the file type you can pass the file that you just saved.
As there is a dependency on the file system to open the file in Excel or Adobe Acrobat you will not be able to achieve your goal of not requiring the file be saved first. While it may be an option to save the file in a temporary location and then open that file it also has an issue that if the user were to click save in excel it would still save in the temporary location so they would need to know to use Save As to save in a different location.

How to import a segment of html into Excel

Requirement:
1.I need to export a table as a excel file.
2.I render it in a html page at first. I have a button to export to html.
My opinion:
1.I get the html from page:
document.getElementById('content').value = document.getElementById('containerId').innerHTML;
form1.submit();
2.I get it from server, response.ContentType = "application/vnd.ms-excel;" // it need the client has installed Microsoft Excel.
3.I got the right Excel file "XXXX.xls".
4.BUT BUT BUT, when I open it, it's alert a waring tell me like
"it's not the right format of Excel, are you confirm to open it?"
I'm feel sorry to see it.
So I want to import the HTML section into a Excel file, then response the right Excel file to USER-AGENT.
I have use the Aspose.Cells library in my project, I don't know how to use it to finish the task, Or is any other solution to solve it ?
If you need to parse html tags/portion to Excel spreadsheet using Aspose.Cells for .NET, you may use Cell.HtmlString attribute to set your desired html code segment in a cell, it will be parsed accordingly in the generated Excel file. Mind you, not all the html tags are supported at the moment.
Aspose.Cells for .NET also supports to convert an Excel file to Html file directly, see the documents on which file formats are supported for conversion, it may help you for your reference:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/opening-files.html
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/saving-files.html
If you still have some issue/confusion, kindly give us details with your sample code using Aspose.Cells API, we can help you.

Resources