答案 0 :(得分:2)
我最终得到了类似的东西:
1)生成图像上传器
Sub color2()
Dim myRange As Range, valuee As String
valuee = InputBox("Search String:")
If valuee = vbNullString Then Exit Sub
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Set myRange = Selection.Find(what:=valuee, after:=Selection(1))
If myRange Is Nothing Then
MsgBox "no value"
Exit Sub
End If
myRange.Interior.ColorIndex = 3
st = myRange.Address(0, 0)
Do Until myRange Is Nothing
Set myRange = Selection.FindNext(after:=myRange)
If myRange.Address(0, 0) = st Then Exit Do
myRange.Interior.ColorIndex = 3
Loop
End Sub
2)创建了rake-task # encoding: utf-8
class GiftImageUploader < CarrierWave::Uploader::Base
storage :file
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
lib/tasks/pictures.rake
这对我来说很成功。