excel-2010

How to insert data directly from Excel to Oracle Database

守給你的承諾、 提交于 2019-12-06 13:27:30
问题 I would like to know how to insert data from Excel to Oracle meaning lets say i have a worksheet full of data and i want to insert them all into Oracle database. how do i do that? thanks in advance. 回答1: Try creating Insert query in Excel(if data is not that huge): like : in AA1 cell write : 'INSERT INTO <TABLE> VALUES(' then respective values from different cells(i.e. 'A1,'+'B1,'...+')') it will create Insert scripts in excel. Just copy the scripts and execute. these are sample queries, plz

Matching function of a regular expression in excel?

天涯浪子 提交于 2019-12-06 11:50:14
I have several cells in my sheet which contain an ISIN . Here is an example of an ISIN: DE0006231004 I have created a regular expression which matches the ISIN: ^[a-zA-Z]{2}[0-9]{10}$ I want to match this regex on my cell and give a 1 if it matches otherwise a 0. Is this possible with a function? The following function will do what you need. It will return either 0 (zero) if string doesn't match or 1 (one) if the string matches to pattern. Function MatchISIN(ISIN As String) Dim regEx As Object Set regEx = CreateObject("vbscript.regexp") regEx.Pattern = "^[a-zA-Z]{2}[0-9]{10}$" regEx.IgnoreCase

AppActivate works in Excel 2007 but not in 2010

痴心易碎 提交于 2019-12-06 11:28:51
I have a excel macro that I run in Excel 2007 and it opens a mainframe application so I can import data from my spreadsheet automatically. This has been working fine, however it doesn't work in Excel 2010. I have tried using the shell command to use the ID but the other application is a mainframe application and non windows based. However, AppActivate "Title" (to open the mainframe application) was working fine in excel 2007. In Excel 2010 I am getting a Run-time error 5 - Invalid procedure call or argument. I've been trying to solve this for two days and it all works fine on 2007 version. Any

How can I export multiple graphs from excel to a single pdf using vba?

 ̄綄美尐妖づ 提交于 2019-12-06 10:01:23
问题 I am completely new to VBA and need to export multiple graphs from an excel workbook to a single pdf using vba. I know it's possible to export the graphs as individual pdf's or jpgs but is it possibly to put all graphs from a workbook into one pdf using vba? Any advice would be greatly appreciated as I can't seem to find what I'm looking for elsewhere. My code so far prints each chart to the pdf, but each chart gets overwritten on the next print. My code is as follows: Sub exportGraphs() Dim

Pasting an array of values over a ListObject (Excel table) destroys the Listobject

非 Y 不嫁゛ 提交于 2019-12-06 08:23:40
In one of my worksheets, I have a Private Sub BuggingVba() That should replace the data in a table with an array of values Dim MyTable As ListObject, myData() As Variant Set MyTable = Me.ListObjects(1) myData = collectMyData ' a function defined somewhere else in my workbook It is probably irrelevant, but before doing so, I resize the list object (I expand line by line because if I do it at once, I overwrite what is below my table instead of schifting it.) Dim current As Integer, required As Integer, saldo As Integer current = MyTable.DataBodyRange.Rows.Count required = UBound(sourceData, 1) -

Excel 2010 - Storing Ribbon Customization in Workbook

旧时模样 提交于 2019-12-06 08:08:24
问题 I'm new to Excel ribbon customization. What is the most straight forward way to store ribbon customization inside a workbook, so that when the workbook is closed the customization disappears without a trace? 回答1: To change the ribbon with a workbook, you need to change the XML file "inside" the xlsx file (which is nothing more but a .zip). Everything is very well explained here: http://www.rondebruin.nl/ribbon.htm Please let us know if that does not answer your question. 回答2: The most

Application.Calculation depending on workbook

孤人 提交于 2019-12-06 07:36:14
I'm managing a workbook with more than 200 000 formulas (some really complicated array formulas) which means that I can't let Excel automatically calculate all the cells every time I click somewhere (it takes around 8 hours to calculate everything). Instead of that, the calculation is set to manual and I have the following VBA code executed when Calculation.xlsm is opened: With Application .CalculateBeforeSave = False .Calculation = xlCalculationManual End With I use custom buttons to calculate only some parts of the 200k cells when needed. I noticed that Excel does keep track of that setting

Error -2147417848 Automation error The object invoked has disconnected from its clients

ε祈祈猫儿з 提交于 2019-12-06 07:02:01
问题 I am working on clearing some tables in 3 excel sheets. My code was working fine with Excel 2007, as i switched to excel 2010 i started getting this runtime error Automation error The object invoked has disconnected from its clients , error number -2147417848 and then excel freezes. the error is showing after running this function 2 times on the line Sheets("Risk Details").Range("A3" & ":BV" & (count + 1)).Delete Shift:=xlUp can anyone help me in finding out why this is happening and how to

ReDim Preserve error

混江龙づ霸主 提交于 2019-12-06 06:22:56
I am trying to redim preserve a two dimensional array. at the very top of my code I have: Dim BayQuestionArray() As Variant Dim numberofbay As Double I have two buttons, the first button is for initializing the array size: numberofbay = 1 ReDim Preserve BayQuestionArray(numberofbay, 37) and the second button is for upsizing the array ReDim Preserve BayQuestionArray(numberofbay + 1, 37) The second button doesn't work, it keeps giving me an error saying Run time error 9 Subscript out of range. Why? When using Preserve to resize an array variable (declared as such, not as Variant), you may only

remove duplicate value but keep rest of the row values

☆樱花仙子☆ 提交于 2019-12-06 05:38:23
问题 I have a excel sheet(csv) like this one: and I want the output(tab delimited) to be like this: Basically: replace duplicates with blanks but if col6 value is different from the previous row for the same col1 value, all the data fields should be included. I am struggling to create a formula which would do this. If I try to "Remove Duplicates" it removes the value and shifts the values up one row. I want it to remove the duplicates but not shift the values up. 回答1: Try this (note, you need a