Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Is it possible to add image( signature captured from client on windows Mobile 6.5 device and saved as a file with jpeg extension)
to text file using vb.net/C#?
objective:
We were trying to include the signature of client from jpeg file to just below Received By section of a text file
===================================
Hotel XYZ
No.26 abc road ....
***********************************
xyzsdafdsaf
Tokyo 28
Japan 55555555
Date : 10/27/2014
Received by
[SignatureImage.jpg]
No, there is no way to put anything but text in a text file. If you want it to be visibly formatted as both text and an image, you will need to output it in a file format which supports both text and images. For instance, you could use PDF or RTF.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I have a big function that returns a list of objects. I basically need the results to be put in to a text file. The list contains objects of a class with attributes string Index and integer count. I would want it to be written in a textfile like:
Index : Count fe.
BOOK_FROM_STORE : 27
Anybody has some guidance?
Parse the data held by your object to string and then write it to a text file.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I canĀ“t find the correct wdsaveformat enumeration so I can save a document as a .dot or .dotx file.
In the code I am showing here I am saving the document as a.docx file.
docx.SaveAs2(newfilename, MSWord.WdSaveFormat.wdFormatDocumentDefault);
According to the documentation, to save a document in a template format, you may use one of the following enumerations:
wdFormatXMLTemplate 14 XML template format.
wdFormatTemplate 1 Microsoft Word template format.
wdFormatTemplate97 1 Word 97 template format.
So, for .dotx, you may use wdFormatXMLTemplate and for .dot, you may use either wdFormatTemplate or wdFormatTemplate97.
Starting with Office 2007, the default document file format is DOCX.
From the docs:
wdFormatDocumentDefault 16
Word default document file format. For Microsoft Office Word 2007, this is the DOCX format.
If you want to use DOTX, you have to select wdFormatTemplate:
wdFormatTemplate 1
Microsoft Word template format.
docx.SaveAs2(newfilename, MSWord.WdSaveFormat.wdFormatTemplate);
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
IN SQL SERVER can create XML Document like following format with every column name come with Datafield FieldName="Batch"
CID,BATCH,EXP_DATE are column names.
enter image description here
Try something like
SELECT 'BATCH' AS [DataField/#fieldName]
,BATCH AS [DataField]
,''
,'EXP_DATE' AS [DataField/#fieldName]
,EXP_Date AS [DataField]
FROM SomeWhere
FOR XML PATH('Memory');
The empty string in the middle is needed to start a new element
And be aware, that the dateformat will be ISO8601 and not 190615 (you should be happy about this!)
If you want to achieve XML document creation from C#, then it can be achieved through ADO.net with Help of DataSet. Method name is DataSet.WriteXml(string Filename).
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
This is a hard one. Need to read in plain text from Word, HTML files, and any readable content from drag-n-drop or copy-n-paste. See below for examples:
Drag-n-drop from Word or alike editor:
Copy-n-paste from browsers:
Using the suggested block I'm able to read in most text except the selected values of drop-down, checkbox and radio buttons.
var text = System.Windows.Forms.Clipboard.GetText();
Clipboard.SetText(text);
How to capture the missing selected values/text of drop-down, checkbox and radio button?
var text = System.Windows.Forms.Clipboard.GetText();
Clipboard.SetText(text);
Will turn the rich text on the clipboard into plain text.
On every machine I use I keep a batch file, calld text.bat on my path which does this to the clipboard contents, so I can press Win+R then type text and convert my clipboard contents to plain text.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How can I check if a file that is in a directory is a CSV file without checking its extension?
If the file extension is not a mandatory for your program design, but only format of the file (csv in your case), the only valid way to check if a given file is either "ok" for you or not, is simply to check your data structure after you populated it from the file.
The basic flow in gross may look like this:
1) Select file
2) Read the file
a) Exception happens somewhere = non valid CSV formatted file
b) All is ok
3) Validate datastructure(s) populated from the file
a) Some mandatory fields are not initialized = non valid CSV file
b) All is ok