Blank cells in Excel when converted to tabbed index - excel

When i convert Excel Sheet data into tabbed delimited the blank cells are not considered, which creates a problem in my java program. When i insert garbage value my program runs properly. hence i need a proper method in which i can deal with the blank cells. If there is a tool it will be better.

Summary: You can manually put a placeholder value in all the blank cells in Excel, and then in Java replace that placeholder with "" or null.
Steps:
1. To quickly grab all blank cells, use your mouse to select the range of cells that you want to import and then press CTRL+G on a PC (or Edit > Special > GoTo on a Mac) and then select "Blank Cells". You will then have all your blank cells selected.
Type in your placeholder value such as "placeholder123" and then press CTRL+ENTER on a PC (or CMD+ENTER on a Mac?). Then the value will be entered in all selected (formerly blank) cells.
In your Java program, ignore all imported values that say "placeholder123".
Does that work for you?

Related

Copy TAB (\t) character in an excel cell

Basically I have a data like this
1 2 3 4
that is separated by a TAB(\t) character.
My problem is whenever i copy this type of data in an excel cell, the data is converted to
1234
and not
1 2 3 4.
Is there a way to do this? Thanks a lot in advance!
Tabs are not displayed in Excel. The tabs when copied in are still there just not displayed. One will need to replace them with spaces. This can be done in another cell with a formula:
=SUBSTITUTE(A1,CHAR(9),REPT(" ",4))
Or in mass in place with VBA:
Sub MyTabReplace()
ActiveSheet.Range(A:A).Replace Chr(9), " "
End Sub
Or with Replace:
Copy a tab character from your data
and paste it into the Find box,
then put spaces or whatever you want to replace it with in the Replace with box.
Using this method is easy and choosing an option in the Within list allows you to replace all the tabs in anything from a selection of cells, all of a sheet to the entire workbook. It can work for at least some other special characters too.
Replace panel may be got with control-H, or Find and Select in ribbon, or Edit menu > Find > Replace ...

Paste tab seperated string into one cell in Excel

Is it possible to copy and paste a string containing tab seperated values in to one cell in Excel.
For example, I have the following string :
Height 1420mm
Width 440mm
I need to copy this to one excel cell and keep the tabs inbetween. Currently, it handles them as a space, which is not what I want.
Go to Data tab> Text to column
Make sure to uncheck the tab as one of the delimiters.
Basically, when you paste a string with tab character, it will paste into multiple cells if the tab delimiter is checked. Make sure it is turned off.

Why do numeric hyperlinks make an entire cell clickable and the text uneditable?

I have notice that if you insert a hyperlink into any cell in Excel and set the text to display to be a number (1, for example), it causes the entire cell to now be clickable in addition to preventing you from changing the hyperlink text afterwards. If you try to change the hyperlink text by going to Edit Hyperlink the Text to Display is always Selection in Document.
If you do the exact same thing but make the Text to Display an alpha character (like a), it works just fine and you can edit the hyperlink Text to Display without issue.
This is causing problems because I am trying to read Excel data using Interop libraries and even those libraries are unable to read the Text to Display when it is set as a whole number with no decimal places.
If you create a Hyperlink like:
You can later edit the "Friendly Name" by selecting the cell and doing the edit in the Formula Bar.

Transform data calculated via formulas into static values

The way I have been using excel to transform data calculated via formulas into static values was to select each cell, press F2 to edit it and then press F9to replace the content of that cell with the result of the formula in it.
I was wondering if there is a convenient way to do this process to a group of selected cells. It would come in handy if I wanted to do this to hundreds of cells at a time.
Could anybody please tell me if that is possible? And if so, how?
If a VBA based solution is viable, then this short routine should suffice.
sub Values_Only()
with selection
.value = .value
end with
end sub
Just select a group of cells and tap Alt+F8 then Run the macro. Optionally, use Options in the Macros dialog to set a hot key combination.
You may also find the Quick Access Toolbar (aka QAT) of use to assign the Paste Values command to a hotkey. Mine is set to Alt+2. With any group of cells selected, Ctrl+C then Alt+2 is sufficient to revert formulas to their returned values. See this for more information.
Highlight all of the desired cells. Copy them. Then right click the highlighted area and select the 123 paste option.

excel batch pasting formulas

I have a list of documents that I want to paste relative links to in Excel. I converted the list to a list of Excel formulas that look like
=HYPERLINK(".\docs\123abc\1.doc","1.doc")
=HYPERLINK(".\docs\456abc\1.doc","1.doc")
However when I paste this in Excel it will paste the text for the formula and not actually make it a formula. I have tried creating a macro to set each cell's FormulaR1C1 value as the value from the text in the cell and that didn't fix it. As well I have tried to copy and paste special as forumla and that did nothing either.
If I type in each formula by hand instead of copying and pasting them it works great, however the list of forumlas I have is a couple hundred and I would prefer not to have to type each one in by hand. Does anyone have any experience with this or suggestions on getting the forumla to register?
Before pasting the formulas,
Select all cells in worksheet
Right click and select "Format Cells..."
In the Number tab page, select General and click OK button.
Paste your formulas list.

Resources