excel

VBA hide all rows in range, if all values in row are “0” [closed]

♀尐吖头ヾ 提交于 2021-01-29 06:13:19
问题 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 13 days ago . Improve this question Im working on a vba project where i need to check a range (e.g. A1:Z100 ), and hide all rows where any cell in a checked row range has the value '0'. For example Row 1 - hide: 0 0 0 0 0 0 0 0 0 ... ' as only zero values Row 2 - don't hide: 0 0 0 0 1 0 0 1 0 ... ' as also other

Use Excel VBA to fill database with payments split in months

半腔热情 提交于 2021-01-29 06:08:55
问题 I'm making a spreadsheet to control my finances. I made a VBA code where I enter 4 different data: i) Client's name; ii) Total value of the contract; iii) Number of months that the contract will be paid; iv) Date of the first payment. I've been able to complete and use the code, that fills a database with these information in 4 different columns. The thing is, I want it to (when I click the insert button) automatically split the value and fill the dates according to the number of months that

Import tab separated CSV, tab delimiter not recognized

我们两清 提交于 2021-01-29 06:04:02
问题 I have tab separated csv files which I want to transform to xlsx. So each csv should be transformed to a xlsx. Filename should be the same. However, the files are tab separated. For example, see this test file screenshot: When I run my code (I created a subfolder xlsx before): Sub all() Dim sourcepath As String Dim sDir As String Dim newpath As String sourcepath = "C:\Users\PC\Desktop\Test\" newpath = sourcepath & "xlsx\" 'make sure subfolder xlsx was created before sDir = Dir$(sourcepath & "

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine giving exception on client

心已入冬 提交于 2021-01-29 06:02:48
问题 I am getting error while reading excel file with MVC website on client machine 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine Its perfectly working with localhost suggest me something 回答1: “The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine” Fix: Install the 2007 Office System Driver: Data Connectivity Components For more information, see SQL SERVER – FIX – Export Error – ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local

VSTO C# Clickable Links in Task Pane

懵懂的女人 提交于 2021-01-29 06:02:26
问题 I have a custom task pane for my Excel VSTO addin. In this task pane I want to display a clickable link (for example "https://stackoverflow.com") to the user which opens the user's browser and navigates to the site when clicked. When I programmatically put the text into the task pane's RichTextBox the text turns blue as if it is being recognized as a URL, however when the text is clicked on nothing happens. Is there a property I need to set for the RichTextBox to allow the link to be clicked

how to get xls file from a ZipArchiveEntry EPPlus C#

北城以北 提交于 2021-01-29 06:01:56
问题 i'am trying to get an xls file from an ZipArchive but cant get it with EPPLUS foreach (ZipArchiveEntry entry in archive.Entries) { if (entry != null) { string filepath = entry.FullName; FileInfo fileInfo = new FileInfo(filepath); //here i got the excel package with the xls file inside the excelPackage using (ExcelPackage excelPackage = new ExcelPackage(fileInfo)) { //but here impossible de get the worksheet or workbook inside or anything else ExcelWorksheet worksheet = excelPackage.Workbook

Expose Excel InlineShapes to edit

我是研究僧i 提交于 2021-01-29 06:01:55
问题 I am trying to automatize filling in a third party form from an Excel Workbook VBA module. They sadly have gone with a Word document with an in-line Excel workbook embedded, which contains cells as named ranges that I want to edit. How do I assign the InlineShapes object to an Excel.workbook object so that I can expose it to Excel methods and properties? This is what I have tried so far: Sub test() Dim wdApp As Word.Application Set wdApp = CreateObject("word.application") wdApp.Visible = true

Code to hide multiple rows based on cell value

前提是你 提交于 2021-01-29 05:58:33
问题 I am trying to check the cell value and based on that, 5 rows should be hidden. For example if the S4 cell value is <=0 then it should hide Rows from 4 to 8 and then again it should check S9 cell value will and if it is <=0 then it should hide rows from 9 to 13 and so on. Like this I have more than 1000 rows. Is there a better way handle this? Please let me know. 回答1: There is something called a "For loop" that helps you go through a big number of rows without having to write down every

Merge to pdf files from excel VBA doesn't export cells correctly

六月ゝ 毕业季﹏ 提交于 2021-01-29 05:55:16
问题 I'm trying to mail merge from Excel to individual pdf files using VBA. Here is a small example: The word document "Testdoc.docx" only contains the mergefield << Name >> Here is the VBA-code: Sub Test() Dim wdOutputName, wdInputName, PDFFileName As String Dim x As Long Dim nRows As Long wdInputName = ThisWorkbook.Path & "\Testdoc.docx" Const wdFormLetters = 0, wdOpenFormatAuto = 0 Const wdSendToNewDocument = 0, wdDefaultFirstRecord = 1, wdDefaultLastRecord = 3 nRows = Sheets(1).Range("A" &

Excel VBA to trigger events in web page once input box get filled with data

无人久伴 提交于 2021-01-29 05:54:46
问题 I am trying to fill one input box in web page which actually trigger events results in auto update some hidden fields. code behind web page <INPUT onchange=iCFieldChanged(this); tabIndex=1017 onkeypress="AllowOnly(event, '[()0-9-+]','');" onfocus="tbInitialValue=this.value;g_fFieldValue = this.value;g_fFieldId = this.id;" onblur="if(tbInitialValue!=this.value && Page_IsValid){executingPostBack=true;__doPostBack('dnn:ctr366:ClaimPhysicianInformation:_ctl2:Datapanel:_ctl0:_ctl5:ClaimRecipient