English 中文(简体)
我如何编写各种长篇的习惯报告?
原标题:How do I create custom generated reports of various length?
  • 时间:2012-04-18 15:48:04
  •  标签:
  • excel
  • vba

我正试图在Excel建立一个标准表格,用于我从其他工作手册中提取的数据。

我谨根据单独表格(Data Sheet)提供的数据,自动生成表格(报告表格)。 我认为,这更简单地说,是写一本书,从几个工作手册中提取个人信息。

我的问题是,记录(浏览)的数量是变数。 我不能简单地从数据表到报告单的囚室,因为有些报告有20个牢房,有些是8个。

实现这一目标的最简单途径是什么? 我 st不住如何建立一个宏观,以检查数据表上有多少浏览量,并在报告表上设定相应的数字,只选择我想要的预定领域。

我认识到,在准入方面,可以更容易做到这一点,但我没有机会。

感谢投入。

问题回答

首先,你有正确的想法,即有一个数据表和一个以适当格式显示所需数据的精度报告表。

I 不能简单地将电池从数据表到报告表,因为有些报告有20个浏览点,有些是8个左右。

Im not sure what you mean by this, are you saying that the rows on the data sheet can grow and shrink in size? Or are you saying you want the end user to be able to select the rows they want on the report? In other words what determines which rows you want on the report?

除此以外,首先,你只想与细胞价值合作,这样,在你的报告表上复制这些数值时,就会保留。

就数据转让而言,根据你对上述问题的答复,有若干方法使用真菌。

  • Advance filter the rows based on a criteria (using the copy to another location)
  • Copy all rows the user has selected (should be no need to use a loop, For Each Row etc)
  • Copy the rows based on a user input box where the user enters the rows required.

我建议复制所有栏目,然后隐藏你不需要的栏目:

Worksheets("Report").Range("B:B,D:E").EntireColumn.Hidden = True




相关问题
import of excel in SQL imports NULL lines

I have a stored procedure that imports differently formatted workbooks into a database table, does work on them then drops the table. Here is the populating query. SELECT IDENTITY(INT,1,1) AS ID ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Excel date to Unix timestamp

Does anyone know how to convert an Excel date to a correct Unix timestamp?

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Importing from excel "applications" using SSIS

I am looking for any tips or resources on importing from excel into a SQL database, but specifically when the information is NOT in column and row format. I am currently doing some pre-development ...