在CentOS 5.6上安装cairo 1.8.6(Installing cairo 1.8.6 on CentOS 5.6)
我今天可能会失明,但我无法想象如何将我在CentOS 5.6上安装的cairo 1.2.4版本升级到1.8.6。 找不到提供最新版cairo的代表。
有人可以帮帮我吗? node-canvas需要它。
I may be blind today, but I can't figure how to upgrade my installed cairo 1.2.4 version on CentOS 5.6 to 1.8.6. Cannot find any reps providing the latest version of cairo.
Can someone help me out please? node-canvas is requiring it.
原文:https://stackoverflow.com/questions/6161262
最满意答案
这应该很容易。 您需要做的就是使用相同的范围并更改单元格的数字格式。 请注意:粘贴的值不变(数组中的值应为日期)。 Excel应用格式,以便更改显示的内容,但不会丢失基础信息。
如果您的数组中充满了字符串,您需要预先将它们转换为日期。 Excel可以隐式执行此操作(例如,它可以自动格式化它们,尽管原始值是日期),但显式转换是首选。
对于您的代码,请使用:
With .Range("D2").Resize(UBound(vef, 1), 1) .Value = vef .Numberformat = "dd.mm.yyyy hh:mm:ss" End With
最后,我只想指出你的
Ubound(vef, 1)
只有在你的数组基于1时才有效。 如果它基于0,则调整大小的范围将偏离1.可用于查找数组中维度长度的公式为:Length = (Ubound(Array, DimensionNumber) - LBound(Array, DimensionNumber)) + 1
所以在你的情况下:
Length = (Ubound(vef, 1) - LBound(vef, 1)) + 1
祝你好运!
That should be easy enough. All you need to do is work with the same range and change the numberformat of the cells. Please note: the value being pasted is unchanged (and the values in your array should be dates). Excel applies a formatting so that what is displayed is changed, but without losing the underlying information.
If your array is full of strings, you will want to look at converting them to Dates beforehand. Excel may do this implicitly (e.g it may automatically format them, despite the original values being dates), but explicit conversion is preferred.
For your code, use this:
With .Range("D2").Resize(UBound(vef, 1), 1) .Value = vef .Numberformat = "dd.mm.yyyy hh:mm:ss" End With
Finally, I would just point out that your
Ubound(vef, 1)
will only work if your array is 1 based. If it is 0 based, your resized range will be off by 1. The formula you can use to find the length of a dimension in an array is:Length = (Ubound(Array, DimensionNumber) - LBound(Array, DimensionNumber)) + 1
So in your case:
Length = (Ubound(vef, 1) - LBound(vef, 1)) + 1
Good luck!
相关问答
更多-
excel怎么使用VBA[2022-04-29]
excel使用VBA主要是通过宏运行的模式 一般要求来说 如果你没有VBA知识 建议用excel公式 VBA的代码在excel开发工具界面 可以在常规选项中 开发工具可见处打勾 就可以看到visual basic 和 宏两个选项 进去就能输入代码 -
如何使用VBA在Excel注释中查找和替换日期格式(How to Find and Replace date format in Excel Comments using VBA)[2022-12-18]
您可以尝试以下代码。 在使用之前,请务必复制您的作品。 正如@Kevin所说,成功将取决于数据输入过程中使用的格式变化。 您提供的代码将遍历工作簿中的所有工作表,这是您想要的吗? 不过,如果不合适的话,试试并回来。 Sub test_comment() Dim Wsh As Worksheet Dim Cmt As Comment For Each Wsh In ActiveWorkbook.Sheets For Each Cmt In Wsh.Comments If InStr ... -
这应该很容易。 您需要做的就是使用相同的范围并更改单元格的数字格式。 请注意:粘贴的值不变(数组中的值应为日期)。 Excel应用格式,以便更改显示的内容,但不会丢失基础信息。 如果您的数组中充满了字符串,您需要预先将它们转换为日期。 Excel可以隐式执行此操作(例如,它可以自动格式化它们,尽管原始值是日期),但显式转换是首选。 对于您的代码,请使用: With .Range("D2").Resize(UBound(vef, 1), 1) .Value = vef .Numberforma ...
-
您不需要使用Set 。 如果要将Object传递给变量,则只能使用它。 此行返回String而不是Object (例如Range,Worksheet,Chart等) MonthName(Month(SetupSheet.Range("C9"))) 'if C9 contains a valid date format 因此,要将其传递给CurrentMonth变量,只需使用= sign赋值: CurrentMonth = MonthName(Month(SetupSheet.Range("C9"))) ...
-
我知道了 单元格(1,1).Value = StartDate 单元格(1,1).NumberFormat =“dd / mm / yyyy” 基本上,我需要设置单元格格式,而不是设置日期。 I got it Cells(1, 1).Value = StartDate Cells(1, 1).NumberFormat = "dd/mm/yyyy" Basically, I need to set the cell format, instead of setting the date.
-
ISO8601格式 - yyyy-mm-dd - 示例2013-02-14 ISO8601 format - yyyy-mm-dd - example 2013-02-14
-
VBA日期格式(VBA Date format)[2022-12-04]
将日期值应用于自动过滤器时,将日期值转换为双精度值: .range("C:C").AutoFilter Field:=1, Criteria1:=">=" & CDbl(currentDate), Criteria2:="<" & CDbl(seuilDate), Operator:=xlAnd 因为VBA非常以美国为中心。 Convert the date values to Doubles when applying them to the autofilter: .range("C:C" ... -
Worksheets("Sheet1").Range("A1").NumberFormat = "@" Worksheets("Sheet1").Range("A1").Value = "10/3" Worksheets("Sheet1").Range("A1").NumberFormat = "@" Worksheets("Sheet1").Range("A1").Value = "10/3"
-
不要使用。选择它会减慢代码速度。 使用.Text返回单元格中的文本,否则返回.Value ,这是一个数字,即自19/1年1月1日以来的天数。 所以: Range("A1").NumberFormat = "d-mmm-yyyy" date= UserSheet1.Cells(1, 1).Text do not use .Select it slows down the code. Use the .Text to return the text in the cell otherwise you are ...
-
VBA函数格式和Excel日期格式的格式符号的含义不是100%相同。 你可以像下面这样使用工作表函数TEXT : Application.Text(
, "mmmmm-yy") 实现你想要的。 The meaning of the format symbols of the VBA function Format and the Excel Date Format are not 100% identically. You could use the worksheet funct ...