OLEDB C# Update and Insert data [duplicate] - c#

I would like to type at least 500 characters in excel sheet cell. But when I do that it only lets me add 1 paragraph like 196 characters. When I add another paragraph, it gives me a message **
"Exceeded Text Limit"
**. How do I resolve this so I can add lot of text in the cell. I googled and tried different things and failed.
Please help !!!

There is a 32,767 character limit in Excel per cell when wrapping text.
You might be able to import it into Access as a Table, with a Memo field that can hold 65,000 characters.
A text box can also hold more, but if you're doing any calculations, this isn't practical.
Try looking here: http://excel.tips.net/Pages/T003163_Character_Limits_for_Cells.html

Related

How to not skip empty cell in Excel when creating .csv file

hope you guys can help!
I am trying to create .csv out of Excel which would have columns A - H filled with some data I want to read but data is optional. So some times the first column A can be empty. Now, when I save the .csv, unless I entered one space in the A column, Excel automatically trims A column, and the result is 7 cells to read A - G instead 8 cells A - H (with A column) being "empty". I would like to save client the trouble of needing to enter one space or -> ="" in the Excel formula to make first or last column "empty" but not trimmed in the resulting .csv.
Thank you!
There is no option in Excel to preserve empty columns, when exporting to .csv. But you could introduce a header text in the first row, so you will always have the columns filled atleast with the header text.
Plus it would make your data probably more readable, depending on what data this is.
Another possibility would be to implement a makro and embedd a button in your excel file:
see
how not to skip empty first cell when saving as .CSV?

C# - Find all matches in worksheet using Excel

enter image description here
I would like to find all "NC2" mathces in this worksheet (later the B column values).
I tried with range.find but I got back only one result.
How can I read out these cells? (Which contains NC2)
what I would do is do a data -> filter to get all the cells.
if it helps, conditional formatting would also help to visually find all the cells containing NC2.

Import Txt file to access database

i have a txt file with format
10000025|246|31032017|00|0|0.00|0.00|0.00|0.00|0|0.00|0.00|0.00|0.00|0.00|0.00|0.00|R
10000025|246|31032017|01|0|0.00|0.00|0.00|0.00|0|0.00|0.00|0.00|0.00|0.00|0.00|0.00|R
10000025|246|31032017|02|0|0.00|0.00|0.00|0.00|0|0.00|0.00|0.00|0.00|0.00|0.00|0.00|R
10000025|246|31032017|03|0|0.00|0.00|0.00|0.00|0|0.00|0.00|0.00|0.00|0.00|0.00|0.00|R
i want import to access database using C# code
If someone has a clue about how to perform something like this, i would be grateful !
I dont think there is any need to use c# sort of thing in this scenario. You can accomplish this task by using an excel sheet. Copy the whole txt file and paste it into the excel sheet, once done Select the header of the cell in which you copied the text (Lets say 'A'). Now in the top menu navigate to Data Tab and select "Text to Columns". A dialogue will appear where you can select Delimited (which is default selection) and click next there you will find the delimiters section where you can specify your delimiter like comma, semi colon, etc. In your case the separator is pipe character '|' so you can specify the pipe character in a text box given in the delimiter list.
Once done click next and finish you will get the data in a column and row form exactly what you were looking for now you can import the data to sql, access or to what ever you want take a look at this Link to know how to import data from excel to access
I am attaching following screen shots
Picture of text data being copied in excelwith header selected
Screen shot of delimiter screen where you will specify the pipe character

How Print single field multiple times as per Quantity on Crystal Reports

I am working on crystal reports. I want to print same field multiple times as per Quantity.
if I enter Quantity 6 then it must print 6 times same filed..
How I do this?
i will explain you some steps just try it
Take a formula field
Use for loop in the formula area in which
append the text to same variable so it you will get a string with
multiple times repeated
Place that formula field in your report
and adjust the width to come to the next line
In properties window
edit the CanGrow field and give max number of lines as per your
requirement.
hope this will help you,

Display Autocomplete list based on a Cell Range

I'm trying to do an Excel Add-In and I would like that, in a worksheet that I'm creating, I could select a cell (or a range of cell) that, once you start typing on it (or them), a dropdown-like with possible matches for the typed characters.
Is this possible to do it programmatically?
The closest that I got to achieve this is through the Validation object of the Cell, but a dropdown-like list of options is not displayed just, as you could imagine, I get to display a message indicating that the text is not valid.
As always, thanks in advance!

Categories