exporting multiple items to excel using openxml - asp.net

hello all i am working on a project in which i have a webpage wherein i have some textboxes and a button.The functionality of that button is to export the data entered into the textboxes to excel in the form of a table.Also an image(stored on my local drive)needs to be exported too along with the textbox data.All of this i want to achieve through openxml only.This is what i want to achieve.Note that the image which is to be exported is some random image on my local drive.![input][1]![output][2]
Any suggestions would be greatly appreciated.Thank you
Input
[1]: http://i.stack.imgur.com/u3vsT.jpg
required output
[2]: http://i.stack.imgur.com/pkILb.jpg

Here is the exact sample you can use to display header, cell values and Image in your ASP.NET application using C#:
http://polymathprogrammer.com/2010/11/10/how-to-insert-multiple-images-in-excel-open-xml/
If you met any problem, write back here and we sure can help.

Related

Is it possible to show datatables (including the data) in a generated pdf from knpsnappy?

At the moment I am generating a pdf using knpsnappy, i'm showing a bunch of data I already want to show in there, but it'd be really handy to put one of my datatables in there, is this possible?
I would have the data as JSON and then display it with ajax. Example
If you don't have a lot of data, then you could just have it in your script file as let myJsonData = {[...JSON data...]}

ASP.Net (VB) Report View Data set Dynamically

I am having a hard time with this one and I assume it is something I am missing as always.
I am using Visual Studio Web Express 2012. I have installed Report Builder and Report Viewer 11. I have created a generic report file in the report builder as I can not seem to view any designer view in Visual Studio. Not the issue. I am pulling data from my SQL database as usual and populate a dataset. All is fine from here. I can not seem to get the data to show in the report view but can not figure out what I am missing. I have looked everywhere on the web as well as Stack specifically. I have used some of the sample codes and have gotten the report to now show up but still no data. Any help would be great.
I create a generic report file in report builder. No fields, no title etc., just the generic report. This may be my issue but I can not seem to figure out what I am missing.
On my page load I populate the dataset as always with no problem as I can display the data in a label etc.
I add the report viewer to my page and add the following code to the page load after the dataset fill. I also noted that you must use if page.postback = false as Ajax seems to not like it otherwise and just seems to loop and continue loading forever.
I have tried many different code ideas but found I finally got the report to load (again no data) with the following.
rv1.Reset()
rv1.LocalReport.DataSources.Clear()
Dim rds As New ReportDataSource("DataSet1", tempDS.Tables(0))
rv1.LocalReport.ReportPath = Server.MapPath("\tests\test.rdl")
rv1.LocalReport.DataSources.Add(rds)
rv1.LocalReport.Refresh()
Again this is VB.Net webpage. What am I missing? Thanks in advance.
Did you bind the datasource? Sorry if i'm wrong, but in C# asp.net you need to bind the datasource after using an atribution.

xls form for conducting survey using android phone

Am working on an xls survey form which when I loaded onto ODK to look for errors it produced this error"You must have a sheet named(case-sensitive):survey"which I dont quite understand.
It's referring to the worksheet in your excel file. Instead of the normal "Sheet 1" etc it needs to be named "survey".
I recommend you use http://ona.io to load and manage your forms. You can sign up and create an account there.. then your profile URL becomes the server URL that you have to enter in the ODK Collect app on the phone. They have given a basic example xlsform that should help you get started.. https://ona.io/examples/
Further documentation on making XLSForms : http://xlsform.org

Exported image filename customization from devexpress ReportPrintTool

I am using Devexpress XtraReport suite in my application which works fine for dynamic reporting requirement except one customization as below:
User is given report preview using ReportPrintTool with dynamic data.
Now, when user tries to export print preview as Image file with 'ExportMode=Different Files' output file names are generated based on report name(i.e. reportName+pageIndex.png) which i need to define based on some dynamic value or say based on a column value provided to report as data source.
Can anybody please guide me how can I achieve this customization?
Reference from: XtraReport default file name in SaveDialog box
Try to set the XtraReport.ExportOptions.PrintPreview.DefaultFileName option (PrintPreviewOptions.DefaultFileName Property).
PrintControl.PrintingSystem.ExportOptions.PrintPreview.DefaultFileName = "column value that you provide"
To know that how to use it, Follow the below reference links:
default name of report during saving - Here some file name standard related issue also descripbed
How modify predefined file name on exporting report
XtraReports - Custom filename when exporting via the reports toolbar

How to enter values to a text field using monkeyrunner

I am trying to enter some text to a text field in my android application using Monkeyrunner.
I wrote the code like this:
device.press('KEYCODE_BUTTON_SELECT',MonkeyDevice.DOWN_AND_UP)
device.press('KEYCODE_U','DOWN_AND_UP')
device.press('KEYCODE_S','DOWN_AND_UP')
device.press('KEYCODE_E','DOWN_AND_UP')
device.press('KEYCODE_R','DOWN_AND_UP')
while running the first line,the text field is getting selected.But The string "user" is not typing there.But the same code i can run out of my application ,In the android native search field i can enter "user" string using this code. I tried the same with device.type('USER') command also.That is also not working
If i am using this code
device.press ('KEYCODE_DPAD_CENTER', MonkeyDevice.DOWN_AND_UP)
It is taping one center button. (In my application page one button is there in the middle of the page.)
Try the following code. It's working in my case:
device.touch(x, y, MonkeyDevice.DOWN_AND_UP)
MonkeyRunner.sleep(1)
device.type('USER')
In the command touch put the coordinates of your edittext instead of x and y
One of the challenges would be to find the coordinates to touch, mainly using different screen sizes and configurations.
AndroidViewClient can help in this respect and you can avoid having to provide the coordinates for the Views and you can simply do:
subject = vc.findViewByIdOrRaise('id/subject')
subject.touch()
subject.type('AVCSample')
this lines were taken from one of the AVC examples: email-send.py
Do you have space character as part of the text you're trying to enter? Try without space and see if that works. Then, you can figure out how to deal with space.

Resources