作者:乔山办公网日期:
返回目录:excel表格制作
这样的模式你也可以直接写公式,前提是相关的表都要同时打开。
其实你的每个月的记录干脆用一个表来连续登记,再通过透视表功能自动实现每个月的、汇总的或者任意组合的统计分析
搜一下C# Excel导入导出,示例代码有很多
Sub 用X替换知0()
Dim reg As Object
Dim t%, b$
r = [A65536].End(xlUp).Row
Set reg = CreateObject("vbscript.regexp")
arr = Range("a1:a" & r)
With reg
.Global = False
.Pattern = "0"
For Each sh In arr
If sh = "190M7B" Then
b = .Replace(sh, "X")
t = t + 1
Range("a" & t) = b
End If
Next
End With
Set reg = Nothing
End Sub
暂定A列为道数据列
在原单元格替内换容只能用VBA。
string filename = jsname + DateTime.Now.ToString("yyyyMMdd") + ".js";
string jsurl = "";
string filePath = Server.MapPath("../../Js/AdsJS/" + filename + "");
string path = HttpContext.Current.Server.MapPath("../../Js/AdsJS");
#region 删除原JS文件
string p1 = Server.MapPath("../../Js/AdsJS/" + filename);
if (File.Exists(p1))
{
File.Delete(p1);
}
#endregion
if (!e5a48de588b6e799bee5baa6e79fa5e98193332System.IO.Directory.Exists(path))
{
System.IO.Directory.CreateDirectory(path);
}
if (!File.Exists(filePath))
{
try
{
File.AppendAllText(filePath, temp);
jsurl = "Js/AdsJS/" + filename;
}
catch (Exception ex2)
{
throw new Exception(ex2.ToString());
}
}
return jsurl;